4

I have been trying to install motion on my Pi3, only to be chasing library errors at every step. None of the tutorials seem to say what flavor of Pi OS to use. I am beginning to wonder if I chose the wrong one?

pi@raspberrypi:~/mmal $ sudo ./motion -n -c motion-mmalcam.conf  
./motion: error while loading shared libraries: libjpeg.so.62: cannot open shared object file: No such file or directory

I took care of that error and then I get

pi@raspberrypi:~/mmal $ sudo ./motion -n -c motion-mmalcam.conf 

./motion: error while loading shared libraries: libavformat.so.53:
   cannot open shared object file: No such file or directory

pi@raspberrypi:~/mmal $ sudo apt-get install -y libavformat53 libavformat53-dev 
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package libavformat53
E: Unable to locate package libavformat53-dev

What has changed since all the tutorials were made as none have these issues? Is there a better repro to start with to get motion to work?

StephanM
  • 141
  • 1
  • 2

1 Answers1

1

Install motion from github and build it yourself. This is how to do it:

sudo mkdir motion 
sudo cd motion
sudo apt-get install autoconf automake autopoint build-essential pkgconf libtool libzip-dev libjpeg-dev git libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libavdevice-dev libwebp-dev gettext libmicrohttpd-dev

git clone https://github.com/Motion-Project/motion.git sudo cd motion sudo autoreconf -fiv sudo ./configure sudo make sudo make install

This will get installed in: /usr/local/bin (motion executable will be here) /usr/local/etc/motion/ (motion-dist-conf will be here, rename it to motion.conf and do the settings) MMAL and picam should work now.

For tutorial and video, you can refer my website: https://www.zenofall.com/diy-motion-detection-camera-with-raspberry-pi-part-2/

Or B
  • 103
  • 5
zenofall
  • 11
  • 2