How to fix Raspi camera 'mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)'
Problem:
You are trying to acess the Raspberry Pi camera using raspistill
or raspivid
, but you see an error message like this:
mmal: Cannot read camera info, keeping the defaults for OV5647
mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)
mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
mmal: Failed to create camera component
mmal: main: Failed to create camera component
mmal: Camera is not enabled in this build. Try running "sudo raspi-config" and ensure that "camera" has been enabled
Solution
The most common issue here is that you don’t have the camera interface enabled. Read How to enable Raspberry Pi camera using raspi-config for instructions on how to do that.
If the camera interface has already been enabled (remember that you need to reboot for the changes to take effect), the most likely reason for error messages like this is that the camera is not connected correctly to the Raspberry Pi:
- Is the CSI cable inserted the right way? The silvery contacts need to face away from the Ethernet connector!
- Is the CSI cable fully seated?
- Did you insert the CSI cable into the Display connector? It needs to be inserted into the CSI connector, which is the one closer to the Ethernet connector.
- Is the other end of the CSI cable correctly attached to the camera board?