You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

在Ubuntu中安装自定义Linux内核5.8.10执行modules_install报错求助

Fixing "cp: cannot stat 'net/atm/atm.ko'" Error During Kernel Module Installation

Hey there, I’ve dealt with this exact kind of custom kernel module hiccup before—let’s walk through the most likely fixes step by step:

1. Verify ATM Module is Configured as a Loadable Module

The error means the atm.ko file wasn’t generated, which usually happens if ATM support wasn’t set up to compile as a module in your kernel config. Here’s how to check and fix that:

  • Navigate to your kernel source directory: cd /path/to/linux-5.8.10
  • If you don’t have the ncurses library installed (required for the config tool), install it first:
    sudo apt install libncurses-dev
    
  • Launch the kernel configuration interface:
    make menuconfig
    
  • Use arrow keys to navigate to:
    Networking support → ATM (Asynchronous Transfer Mode) support
  • Ensure this option is set to M (loadable module) instead of * (built-in to kernel) or blank (disabled). Press M to toggle if needed, then save your config (press ESC twice, select "Save" and confirm).

2. Clean and Recompile Modules

With the correct config in place, we’ll clean partial compile artifacts and rebuild modules properly:

  • Clean only module-related build files (this preserves your kernel config):
    make modules_clean
    
  • Rebuild all kernel modules:
    make modules
    
    Wait for compilation to finish—this may take some time depending on your hardware.
  • Try installing the modules again:
    sudo make modules_install
    

3. Check for Silent Compilation Errors (If Issue Persists)

If atm.ko still doesn’t appear, the module might have failed to compile without obvious feedback. Run a verbose compile to see detailed errors:

make modules V=1

Scroll through the output to find errors related to net/atm. A common fix here is installing missing ATM development dependencies:

sudo apt install linux-atm-dev

Then repeat the clean/recompile steps above.

4. Verify Kernel Source Integrity

If all else fails, your kernel source archive might be corrupted. Re-download the 5.8.10 source, verify its SHA256 checksum matches the official listing, extract it, and repeat your installation steps from the start.

内容的提问来源于stack exchange,提问作者Md. Rokonuzzaman Reza

火山引擎 最新活动