Motion Eye on Raspbian-stretch?

1,126 views
Skip to first unread message

wally333

unread,
Sep 19, 2017, 8:21:22 PM9/19/17
to motioneye
I'm trying to install Motion Eye on Raspbian-stretch, but the instructions for Jessie (with some seemingly obvious modifications) don't work:

ffmpeg seemed to install OK:
sudo dpkg -i ffmpeg_3.1.1-1_armhf.deb
Selecting previously unselected package ffmpeg.
(Reading database ... 140655 files and directories currently installed.)
Preparing to unpack ffmpeg_3.1.1-1_armhf.deb ...
Unpacking ffmpeg (3.1.1-1) ...
Setting up ffmpeg (3.1.1-1) ...
Processing triggers for man-db (2.7.6.1-2) ..

But installing the dependencies for motion fails:
sudo apt-get install python-pip python-dev curl libssl-dev libcurl4-openssl-dev libjpeg-dev libx264-142 libavcodec56 libavformat56 libmysqlclient18 libswscale3 libpq5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package libmysqlclient18 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package libavcodec56 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package libavformat56 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Unable to locate package libx264-142
E: Package 'libavcodec56' has no installation candidate
E: Package 'libavformat56' has no installation candidate
E: Package 'libmysqlclient18' has no installation candidate
E: Unable to locate package libswscale3


So figuring a stretch build of motion may not need these I soldiered on:
sudo dpkg -i pi_stretch_motion_4.0.1-1_armhf.deb
Selecting previously unselected package motion.
(Reading database ... 141041 files and directories currently installed.)
Preparing to unpack pi_stretch_motion_4.0.1-1_armhf.deb ...
Unpacking motion (4.0.1-1) ...
dpkg: dependency problems prevent configuration of motion:
 motion depends on libmariadbclient18 (>= 5.5.36); however:
  Package libmariadbclient18 is not installed.
 motion depends on libpq5; however:
  Package libpq5 is not installed.

dpkg: error processing package motion (--install):
 dependency problems - leaving unconfigured
Processing triggers for systemd (232-25+deb9u1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Errors were encountered while processing:
 motion


Not being a quitter I tried:
sudo apt-get install libmariadbclient18 libpq5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 libmariadbclient18 : Depends: mysql-common but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

I can follow instructions so I did:
sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
  libmariadbclient18 libpq5 mysql-common
The following NEW packages will be installed:
  libmariadbclient18 libpq5 mysql-common
0 upgraded, 3 newly installed, 0 to remove and 4 not upgraded.
1 not fully installed or removed.
Need to get 831 kB of archives.
After this operation, 4,582 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://mirrordirector.raspbian.org/raspbian stretch/main armhf mysql-common all 5.8+1.0.2 [5,608 B]
Get:2 http://mirrordirector.raspbian.org/raspbian stretch/main armhf libmariadbclient18 armhf 10.1.23-9+deb9u1 [710 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian stretch/main armhf libpq5 armhf 9.6.4-0+deb9u1 [115 kB]
Fetched 831 kB in 2s (300 kB/s)
Selecting previously unselected package mysql-common.
(Reading database ... 141077 files and directories currently installed.)
Preparing to unpack .../mysql-common_5.8+1.0.2_all.deb ...
Unpacking mysql-common (5.8+1.0.2) ...
Selecting previously unselected package libmariadbclient18:armhf.
Preparing to unpack .../libmariadbclient18_10.1.23-9+deb9u1_armhf.deb ...
Unpacking libmariadbclient18:armhf (10.1.23-9+deb9u1) ...
Selecting previously unselected package libpq5:armhf.
Preparing to unpack .../libpq5_9.6.4-0+deb9u1_armhf.deb ...
Unpacking libpq5:armhf (9.6.4-0+deb9u1) ...
Setting up mysql-common (5.8+1.0.2) ...
update-alternatives: using /etc/mysql/my.cnf.fallback to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Setting up libmariadbclient18:armhf (10.1.23-9+deb9u1) ...
Setting up libpq5:armhf (9.6.4-0+deb9u1) ...
Processing triggers for libc-bin (2.24-11+deb9u1) ...
Setting up motion (4.0.1-1) ...
Adding group `motion' (GID 117) ...
Done.
Warning: The home dir /var/lib/motion you specified already exists.
Adding system user `motion' (UID 112) ...
Adding new user `motion' (UID 112) with group `motion' ...
The home directory `/var/lib/motion' already exists.  Not copying from `/etc/skel'.
adduser: Warning: The home directory `/var/lib/motion' does not belong to the user you are currently creating.
Adding user `motion' to group `video' ...
Adding user motion to group video
Done.
Processing triggers for systemd (232-25+deb9u1) ...


Seems reasonable, so on to motioneye:
sudo pip install motioneye
Collecting motioneye
  Downloading motioneye-0.37.1.tar.gz (754kB)
    100% |████████████████████████████████| 757kB 73kB/s 
Requirement already satisfied: jinja2 in /usr/lib/python2.7/dist-packages (from motioneye)
Requirement already satisfied: pillow in /usr/lib/python2.7/dist-packages (from motioneye)
Collecting pycurl (from motioneye)
  Downloading pycurl-7.43.0.tar.gz (182kB)
    100% |████████████████████████████████| 184kB 252kB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-PjPsMX/pycurl/setup.py", line 823, in <module>
        ext = get_extension(sys.argv, split_extension_source=split_extension_source)
      File "/tmp/pip-build-PjPsMX/pycurl/setup.py", line 497, in get_extension
        ext_config = ExtensionConfiguration(argv)
      File "/tmp/pip-build-PjPsMX/pycurl/setup.py", line 71, in __init__
        self.configure()
      File "/tmp/pip-build-PjPsMX/pycurl/setup.py", line 107, in configure_unix
        raise ConfigurationError(msg)
    __main__.ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-PjPsMX/pycurl/


Not being very experience with Python this leaves me dead in the water.

Any suggestions on how to proceed?

wally333

unread,
Sep 20, 2017, 4:29:55 PM9/20/17
to motioneye
After a bit of python related Google-Fu,

sudo apt-get install libssl-dev libcurl4-openssl-dev

Allowed  "sudo pip install motioneye" to complete:

In the process my ffmpeg got updated from the deb installed 3..1.1-1 so I may not be out of the woods yet.

Rebooting and will see if its working or not and report back.

wally333

unread,
Sep 20, 2017, 6:52:39 PM9/20/17
to motioneye
Well the motioneye service doesn't start.

How can I get a clue as to why it doesn't start?

Here is the relavant snippit from sudo systemctl list-units
  mosquitto.service                                                                loaded active running   LSB: mosquitto MQTT v3.1 
  motion.service                                                                   loaded active exited    LSB: Start Motion detecti
● motioneye.service                                                                loaded failed failed    motionEye Server         
  networking.service                                                               loaded active exited    Raise network interfaces 
  nodered.service                                                                  loaded active running   Node-RED graphical event 

None of the motioneye webpages connect.

wally333

unread,
Sep 20, 2017, 7:26:37 PM9/20/17
to motioneye
After a boatload of scrolling through the syslog file it seems I'd forgotten the 
sudo mkdir -p /var/lib/motioneye
step.

Got the :8765 webpage displayed.

TIme will tell if my "newer" ffmpeg version messes things up.

wally333

unread,
Sep 20, 2017, 8:24:39 PM9/20/17
to motioneye
Made an 960x544 mp4 movie triggered by motion detection.  So it looks like the stretch ffmpeg 3.2.x works fine with the stretch motion deb.

The piZero-W is kind of weak for video like this, But I don't really want movies for my purposes anyway.
The one per second snapshots are pretty good quality.
Reply all
Reply to author
Forward
0 new messages