-4

I am working on a project. I have Raspbian installed on my Raspberry Pi. When I do sudo lsmod I have no output. I cannot use lirc and i2c module as this require firmware modules. I have to submit the project in 5 days.

Here is the output of lsmod:

Module Size Used by

For modeprobe i2c_dev:

libkmod: ERROR ../libkmod/libkmod.c:554 kmod_search_moddep:
could not open moddep file '/lib/modules/3.18.9+/modules.dep.bin'. 

sudo i2cdetect -y 1 gives this output:

Could not open file '/dev/i2c-1' or '/dev/i2c/1': No such file or directory

uname -a:

Linux raspberrypi 3.18.9+ #767 PREEMPT Sat Mar 7 21:41:13 GMT 2015 armv6l GNU/Linux

cat /etc/os-release:

PRETTY_NAME="Raspbian GNU/Linux 7 (wheezy)"
NAME="Raspbian GNU/Linux"
VERSION_ID="7"
VERSION="7 (wheezy)"
ID=raspbian
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
  • Welcome -- but you are not going to get any help unless you can explain further what your problem is. There should not be an issue loading the i2c modules on Raspbian. What happens if you try sudo modprobe i2c_dev then lsmod (which does not require sudo)? Also make sure you have read this if the issue is using the modules. – goldilocks Jul 11 '15 at 17:02
  • sorry about that. Here is the output of lsmod" Module Size Used by". For modeprobe i2c_dev libkmod: ERROR ../libkmod/libkmod.c:554 kmod_search_moddep: could not open moddep file '/lib/modules/3.18.9+/modules.dep.bin'. sudo i2cdetect -y 1 gives this output Could not open file '/dev/i2c-1' or '/dev/i2c/1': No such file or directory – user3563091 Jul 11 '15 at 18:53
  • 1
    @user3563091 You need to add edit your original post and add any relevant information. As a minimum I'd suggest the information in your comment, plus the model of Pi you are using, plus the result of uname -a, plus the result of cat /etc/os-release. – joan Jul 11 '15 at 19:07
0
libkmod: ERROR ../libkmod/libkmod.c:554 kmod_search_moddep:
could not open moddep file '/lib/modules/3.18.9+/modules.dep.bin'.

It would seem that this directory is missing or something. Have a look in /lib/modules/3.18.9+ and see if there is anything there. If there is, try sudo depmod and then sudo modprobe i2c-dev again.

If either of those fails, or that directory is missing or empty, you could try rpi-update and see if that will replace them.

If that fails, the easiest thing to do is probably just re-install your SD card image. Alternately, you could copy that directory out of an image (see here about how to get it out), if it is there (it might not be if it was part of an update). It needs to be 3.18.9+ exactly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.