How to install packages on distributions that dont have apt

5,678

You can't install packages in motionEyeOS. In order to install software including motionEye on a Raspberry Pi, you can install Raspbian and then install motionEye in Raspbian by following the official motionEye installation instructions in Install On Raspbian. The instructions for installing motionEye from this link are duplicated below.

Show what version of Debian (also works for many Debian-based distributions like Raspbian) you are running using this command:

cat /etc/issue  

Example output of cat /etc/issue for Raspbian:

Raspbian GNU/Linux 8 \n \l  

This output shows that a Raspbian distribution which is based on Debian Jessie (the latest version) is installed. In order to install motionEye, Raspbian also has to be an up-to-date version.

Instructions

  1. ffmpeg is missing from the official Debian repos. Moreover, the variant offered by deb-multimedia.org no longer works with Raspbian after recent updates. You can either compile it yourself (not recommended) or download this prebuilt package and install it:

    wget https://github.com/ccrisan/motioneye/wiki/precompiled/ffmpeg_3.1.1-1_armhf.deb  
    sudo dpkg -i ffmpeg_3.1.1-1_armhf.deb
    

    Note: If you have previously added the deb-multimedia repo to your system and installed their version of ffmpeg, you'll need to remove the repo from your apt sources and run the following commands to remove related libraries:

    sudo apt-get remove libavcodec-extra-56 libavformat56 libavresample2 libavutil54
    
  2. Install the dependencies from the repositories:

    sudo apt-get install python-pip python-dev curl libssl-dev libcurl4-openssl-dev libjpeg-dev libx264-142 libavcodec56 libavformat56 libmysqlclient18 libswscale3 libpq5
    

    Note: v4l-utils appears to be preinstalled on Raspbian systems; if it isn't, please install it

  3. Install motion:

    wget https://github.com/Motion-Project/motion/releases/download/release-4.0.1/pi_jessie_motion_4.0.1-1_armhf.deb  
    sudo dpkg -i pi_jessie_motion_4.0.1-1_armhf.deb
    

    Note: All official precompiled binaries of motion can be found here.

  4. Install motioneye, which will automatically pull Python dependencies (tornado, jinja2, pillow and pycurl):

    sudo python -m pip install motioneye
    
  5. Prepare the configuration directory:

    sudo mkdir -p /etc/motioneye  
    sudo cp /usr/local/share/motioneye/extra/motioneye.conf.sample /etc/motioneye/motioneye.conf
    
  6. Prepare the media directory:

    sudo mkdir -p /var/lib/motioneye
    
  7. Add an init script, configure it to run at startup and start the motionEye server:

    sudo cp /usr/local/share/motioneye/extra/motioneye.systemd-unit-local /etc/systemd/system/motioneye.service    
    sudo systemctl daemon-reload  
    sudo systemctl enable motioneye  
    sudo systemctl start motioneye  
    
  8. To upgrade to the newest version of motionEye, just issue:

    sudo python -m pip install motioneye --upgrade  
    sudo systemctl restart motioneye  
    
Share:
5,678

Related videos on Youtube

Bluscream
Author by

Bluscream

Updated on September 18, 2022

Comments

  • Bluscream
    Bluscream almost 2 years

    i am searching the web for half a day now and found nothing so far.

    I need a way to obtain any apt-get package as .deb file or something so i can install it without apt-get install.

    For example i want to unzip a zip archive:

    sh-4.3# unzip 2.zip
    sh: unzip: command not found
    sh-4.3# apt-get install unzip
    sh: apt-get: command not found
    

    Or a alternative i would also love would be just downloading apt from somewhere (?) and install it as .deb file.

    • jcbermu
      jcbermu over 7 years
      Are you using Debian, Ubuntu or any other Debian-derived distribution?
    • Bluscream
      Bluscream over 7 years
      @jcbermu Linux CCTV 4.4.37-v7 #1 SMP Sat Dec 10 16:50:52 EET 2016 armv7l GNU/Linux to be exact: motionEyeOS on a RaspberryPi3B
    • user45891
      user45891 over 7 years
      if it is not a debian derivate you cannot use .deb files at all. Even worse if it is not any common distrubution using a package manager (fedora/centos, opensuse, arch, ...) you have to compile the program yourself
    • Bluscream
      Bluscream over 7 years
      @user45891 it doesn't have MAKE tho :(
    • user45891
      user45891 over 7 years
      motionEyeOs is build via BuildRoot, which promises to make cross compiling easier. So you could compile on your PC and then transfer and install it
    • Bluscream
      Bluscream over 7 years
      @user45891 which os would i need on my pc?
    • Blaizz
      Blaizz over 7 years
      The official motionEye installation instructions recommend using the latest version of Raspbian OS on your Raspberry Pi 3 Model B.
    • Blaizz
      Blaizz over 7 years
      Official Raspbian website: raspberrypi.org/downloads/raspbian Official motionEye website: github.com/ccrisan/motioneye/wiki/Install-On-Raspbian
  • Bluscream
    Bluscream over 7 years
    There is no apt at all on the system sh: apt-get: command not found
  • Bluscream
    Bluscream over 7 years
    Linux CCTV 4.4.37-v7 #1 SMP Sat Dec 10 16:50:52 EET 2016 armv7l GNU/Linux lets see :D
  • Bluscream
    Bluscream over 7 years
    Doesn't look like there's too much in here tho :( github.com/raspberrypi/linux/…
  • Bluscream
    Bluscream over 7 years
    Found this archive.raspbian.org/raspbian/pool/main/a/apt/… but sh-4.3# dpkg -i apt_1.4~beta1_armhf.deb sh: dpkg: command not found
  • Bluscream
    Bluscream over 7 years
    I dont want to bloat the whole pi with packages. I just want to have some way to monitor my server load. (Like webmin or htop)