0

I am trying to install kernel modules, but when I run make modules_install, the following appears:

  INSTALL virt/lib/irqbypass.ko
  DEPMOD  4.19.97-gentoo
  depmod: ERROR: openat(1023, 4.19.97-gentoo-x86_64, O_RDONLY): Too many open files
  depmod: ERROR: openat(1023, kernel, O_RDONLY): Too many open files
  depmod: ERROR: openat(1023, arch, O_RDONLY): Too many open files
  depmod: ERROR: openat(1023, crypto, O_RDONLY): Too many open files
  depmod: ERROR: openat(1023, drivers, O_RDONLY): Too many open files
  depmod: ERROR: openat(1023, fs, O_RDONLY): Too many open files
  depmod: ERROR: openat(1023, lib, O_RDONLY): Too many open files
  depmod: ERROR: openat(1023, net, O_RDONLY): Too many open files
  depmod: ERROR: openat(1023, virt, O_RDONLY): Too many open files
  depmod: ERROR: openat(1023, x86, O_RDONLY): Too many open files
  depmod: ERROR: could not create module /lib/modules/4.19.97-gentoo/4.19.97-gentoo-x86_64/4.19.97-gentoo-x86_64/4.19.97-gentoo-x86_64/4.19.97-gentoo-x86_64/4.19.97-gentoo-x86_64/4.19.97-gento

The last line goes on for a very long time, eventually ending with "4.19.97-gentoo-x86_64/kernel/crypto/arc4.ko: File name too long." I configured the kernel using make menuconfig. Aside from this, the system is working ok. I am using btrfs RAID 10. Here is the sequence of commands leading up to this point:

  1. make -j8
  2. make modules
  3. make modules_install
2
  • This does not seem like a make problem. It's more likely system wide. Troubleshooting with this answer here (it's not Ubuntu specific), could help.
    – runcz
    Commented Feb 19, 2020 at 9:03
  • 1
    @runcz: It turned out that there was a symlink (/lib/modules/4.19.97-gentoo/) pointing to itself. Removing that fixed the issue.
    – Rich
    Commented Feb 20, 2020 at 8:39

1 Answer 1

0

This appears to have been resolved by removing an incorrect symlink for /lib/modules/4.19.97-gentoo that pointed to the same folder. This is indicated in the last line of the error, as the output shows a seemingly endless depth of the nested directories.

depmod: ERROR: could not create module /lib/modules/4.19.97-gentoo/4.19.97-gentoo-x86_64/4.19.97-gentoo-x86_64/4.19.97-gentoo-x86_64/4.19.97-gentoo-x86_64/4.19.97-gentoo-x86_64/4.19.97-gentoo

The directory, without that erroneous symlink should be /lib/modules/4.19.97-gentoo.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .