Modprobe error when trying to enable i2c


#1

modprobe: ERROR: …/libkmod/libkmod.c:557 kmod_search_moddep() could not open moddep file '/lib/modules/4.14.68/modules.dep.bin’

Been getting the above error when trying to enable i2c via Dockerfile.

Dockerfile

FROM resin/raspberry-pi-node

COPY . /app
WORKDIR /app
RUN npm install
EXPOSE 1883
CMD modprobe i2c-dev && node /app/proccess.js


#2

Hi @g_abhishek_agarwal,

The i2c_dev module is already inserted at boot time on RPi3 images.

Also from a container you should do insmod to insert modules and not modprobe if ever needed.

Regards!