MediaGoblin is a free software media publishing platform that anyone can run. You can think of it as a decentralized alternative to Flickr, YouTube, SoundCloud, etc. It’s also:

 

  • The perfect tool to show and share your media!
  • Building tools to empower the world through decentralization!
  • Built for extensibility. Multiple media types, including video support!
  • Part of the GNU project and devoted to user freedom.
  • Powered by a community of people like you.

In this post, I will install mediagoblin to my own server. It will be use the programs python3, fastcgi, nginx (apache2 config is broken) and the sqlite database since I do not plan on opening public registration to the site.

You can follow the official installation steps from the documentation: https://mediagoblin.readthedocs.io/en/stable/siteadmin/deploying.html

We need to install the dependencies:

sudo apt-get install git-core python python-dev python-lxml \
    python-imaging python-virtualenv npm nodejs-legacy automake \
    python3-pip nginx

We also need a separate user account for mediagoblin to secure the system. You may wish to use a different username for mediagoblin. We need to create a mediagoblin group and associate the mediagoblin user with that group. We also need to switch to the new user account.

$ sudo useradd -c "GNU Mediagoblin System Account" -d /var/lib/mediagoblin -m -r -g www-data mediagoblin
$ sudo groupadd mediagoblin && sudo usermod --append -G mediagoblin mediagoblin
$ sudo su mediagoblin -s /bin/bash

We need to create our mediagoblin directory to house the git clone.

$ sudo mkdir -p /srv/mediagoblin && sudo chown -hR mediagoblin:www-data /srv/mediagoblin

We now need to clone the mediagoblin git repo and use the stable branch. First, we need to change directory to your preferred mediagoblin directory I chose /srv/mediagoblin as an example. We also need to switch to the mediagoblin user account. Clone the git repo, set up the environment.

$ tmux
$ cd /srv/mediagoblin
$ git clone git://git.savannah.gnu.org/mediagoblin.git -b stable
$ cd mediagoblin
$ git submodule init && git submodule update
$ ./bootstrap.sh && ./configure --with-python3 && make
$ mkdir user_dev && chmod 750 user_dev
$ ./bin/easy_install flup

Here are the sample output of the above commands:

mediagoblin@pi:/srv/mediagoblin/mediagoblin$ git submodule init && git submodule update
Submodule 'extlib/pdf.js' (git://github.com/mozilla/pdf.js.git) registered for path 'extlib/pdf.js'
Submodule 'extlib/sandyseventiesspeedboat' (https://github.com/jpope777/sandyseventiesspeedboat-mg.git) registered for path 'extlib/sandyseventiesspeedboat'
Submodule 'extlib/skeleton' (git://github.com/dhg/Skeleton.git) registered for path 'extlib/skeleton'
Cloning into '/srv/mediagoblin/mediagoblin/extlib/pdf.js'...
Cloning into '/srv/mediagoblin/mediagoblin/extlib/sandyseventiesspeedboat'...
Cloning into '/srv/mediagoblin/mediagoblin/extlib/skeleton'...
Submodule path 'extlib/pdf.js': checked out '369b81b63f560b5d729da26752ca541503d81510'
Submodule path 'extlib/sandyseventiesspeedboat': checked out '8873d9b559a4c5b3bb90997227d5455f8730fd48'
Submodule path 'extlib/skeleton': checked out '7ab682091d1032035cfcb668e6bd4b465bfa4679'
mediagoblin@pi:/srv/mediagoblin/mediagoblin$ ./bootstrap.sh && ./configure --with-python3 && make
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/bin/autoconf --force
autoreconf: configure.ac: not using Autoheader
autoreconf: configure.ac: not using Automake
autoreconf: Leaving directory `.'
checking for python3... python3
checking for virtualenv... virtualenv
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for a BSD-compatible install... /usr/bin/install -c
configure: creating ./config.status
config.status: creating Makefile
rm -f ./bin/python
virtualenv --system-site-packages --python=python3 .
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /srv/mediagoblin/mediagoblin/bin/python3
Also creating executable in /srv/mediagoblin/mediagoblin/bin/python
Installing setuptools, pkg_resources, pip, wheel...
.
.
.
.

compiling catalog mediagoblin/i18n/pt_BR/mediagoblin.po to mediagoblin/i18n/pt_BR/LC_MESSAGES/mediagoblin.mo
compiling catalog mediagoblin/i18n/bg/mediagoblin.po to mediagoblin/i18n/bg/LC_MESSAGES/mediagoblin.mo
compiling catalog mediagoblin/i18n/is_IS/mediagoblin.po to mediagoblin/i18n/is_IS/LC_MESSAGES/mediagoblin.mo
compiling catalog mediagoblin/i18n/ko_KR/mediagoblin.po to mediagoblin/i18n/ko_KR/LC_MESSAGES/mediagoblin.mo
compiling catalog mediagoblin/i18n/te/mediagoblin.po to mediagoblin/i18n/te/LC_MESSAGES/mediagoblin.mo
compiling catalog mediagoblin/i18n/ar/mediagoblin.po to mediagoblin/i18n/ar/LC_MESSAGES/mediagoblin.mo
compiling catalog mediagoblin/i18n/uz@Latn/mediagoblin.po to mediagoblin/i18n/uz@Latn/LC_MESSAGES/mediagoblin.mo
compiling catalog mediagoblin/i18n/zh_CN/mediagoblin.po to mediagoblin/i18n/zh_CN/LC_MESSAGES/mediagoblin.mo
compiling catalog mediagoblin/i18n/hi/mediagoblin.po to mediagoblin/i18n/hi/LC_MESSAGES/mediagoblin.mo
compiling catalog mediagoblin/i18n/sr/mediagoblin.po to mediagoblin/i18n/sr/LC_MESSAGES/mediagoblin.mo
compiling catalog mediagoblin/i18n/nb_NO/mediagoblin.po to mediagoblin/i18n/nb_NO/LC_MESSAGES/mediagoblin.mo
compiling catalog mediagoblin/i18n/el/mediagoblin.po to mediagoblin/i18n/el/LC_MESSAGES/mediagoblin.mo
compiling catalog mediagoblin/i18n/ja/mediagoblin.po to mediagoblin/i18n/ja/LC_MESSAGES/mediagoblin.mo
compiling catalog mediagoblin/i18n/dz/mediagoblin.po to mediagoblin/i18n/dz/LC_MESSAGES/mediagoblin.mo
compiling catalog mediagoblin/i18n/ca@valencia/mediagoblin.po to mediagoblin/i18n/ca@valencia/LC_MESSAGES/mediagoblin.mo
compiling catalog mediagoblin/i18n/da/mediagoblin.po to mediagoblin/i18n/da/LC_MESSAGES/mediagoblin.mo
compiling catalog mediagoblin/i18n/es/mediagoblin.po to mediagoblin/i18n/es/LC_MESSAGES/mediagoblin.mo
compiling catalog mediagoblin/i18n/de/mediagoblin.po to mediagoblin/i18n/de/LC_MESSAGES/mediagoblin.mo
compiling catalog mediagoblin/i18n/sq/mediagoblin.po to mediagoblin/i18n/sq/LC_MESSAGES/mediagoblin.mo
compiling catalog mediagoblin/i18n/cy/mediagoblin.po to mediagoblin/i18n/cy/LC_MESSAGES/mediagoblin.mo
compiling catalog mediagoblin/i18n/tr_TR/mediagoblin.po to mediagoblin/i18n/tr_TR/LC_MESSAGES/mediagoblin.mo
compiling catalog mediagoblin/i18n/eo/mediagoblin.po to mediagoblin/i18n/eo/LC_MESSAGES/mediagoblin.mo
compiling catalog mediagoblin/i18n/pl/mediagoblin.po to mediagoblin/i18n/pl/LC_MESSAGES/mediagoblin.mo
compiling catalog mediagoblin/i18n/sl/mediagoblin.po to mediagoblin/i18n/sl/LC_MESSAGES/mediagoblin.mo
Skipping mediagoblin/i18n/templates/en/mediagoblin.po which pybabel can't compile :(
compiling catalog mediagoblin/i18n/cs/mediagoblin.po to mediagoblin/i18n/cs/LC_MESSAGES/mediagoblin.mo
cp -n mediagoblin.example.ini mediagoblin.ini
mediagoblin@pi:/srv/mediagoblin/mediagoblin$
.
.
.

compiling catalog mediagoblin/i18n/sl/mediagoblin.po to mediagoblin/i18n/sl/LC_MESSAGES/mediagoblin.mo
Skipping mediagoblin/i18n/templates/en/mediagoblin.po which pybabel can't compile :(
compiling catalog mediagoblin/i18n/cs/mediagoblin.po to mediagoblin/i18n/cs/LC_MESSAGES/mediagoblin.mo
cp -n mediagoblin.example.ini mediagoblin.ini
mediagoblin@pi:/srv/mediagoblin/mediagoblin$ mkdir user_dev && chmod 750 user_dev
mediagoblin@pi:/srv/mediagoblin/mediagoblin$ ./bin/easy_install flup
Searching for flup
Reading https://pypi.python.org/simple/flup/
Downloading https://pypi.python.org/packages/88/e5/17bcf4431e811ffaec213feea7609a6f003084006d2e210f53cee09095d9/flup-1.0.3-py3-none-any.whl#md5=db38c7fbf2bddfe82b395730364b4ae0
Best match: flup 1.0.3
Processing flup-1.0.3-py3-none-any.whl
Installing flup-1.0.3-py3-none-any.whl to /srv/mediagoblin/mediagoblin/lib/python3.5/site-packages
Adding flup 1.0.3 to easy-install.pth file

Installed /srv/mediagoblin/mediagoblin/lib/python3.5/site-packages/flup-1.0.3-py3.5.egg
Processing dependencies for flup
Finished processing dependencies for flup

 

We now need to modify the configuration files:
$ cp -av mediagoblin.ini mediagoblin_local.ini && cp -av paste.ini paste_local.ini
Then edit mediagoblin_local.ini:
  • Set email_sender_address to the address you wish to be used as the sender for system-generated emails (I do not have email configured so I just changed them to localhost)
  • Edit direct_remote_path, base_dir, and base_url if your mediagoblin directory is not the root directory of your vhost. (I did not edited these values in this example.)

We need to initialize the database. If you encounter errors at this step like ImportError: No module named ‘lxml’ you just need to run $ sudo pip3 install lxml

$ ./bin/gmg dbupdate

 

Here are my errors:

    load_entry_point('mediagoblin', 'console_scripts', 'gmg')()
  File "/srv/mediagoblin/mediagoblin/mediagoblin/gmg_commands/__init__.py", line 148, in main_cli
    args.func(args)
  File "/srv/mediagoblin/mediagoblin/mediagoblin/gmg_commands/dbupdate.py", line 236, in dbupdate
    run_dbupdate(app_config, global_config)
  File "/srv/mediagoblin/mediagoblin/mediagoblin/gmg_commands/dbupdate.py", line 167, in run_dbupdate
    run_alembic_migrations(db, app_config, global_config)
  File "/srv/mediagoblin/mediagoblin/mediagoblin/gmg_commands/dbupdate.py", line 134, in run_alembic_migrations
    cfg = build_alembic_config(global_config, None, session)
  File "/srv/mediagoblin/mediagoblin/mediagoblin/db/migration_tools.py", line 384, in build_alembic_config
    plugin, "migrations")
  File "/srv/mediagoblin/mediagoblin/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1197, in resource_filename
    return get_provider(package_or_requirement).get_resource_filename(
  File "/srv/mediagoblin/mediagoblin/lib/python3.5/site-packages/pkg_resources/__init__.py", line 431, in get_provider
    __import__(moduleOrReq)
  File "/srv/mediagoblin/mediagoblin/mediagoblin/media_types/image/__init__.py", line 20, in <module>
    from mediagoblin.media_types.image.processing import sniff_handler, \
  File "/srv/mediagoblin/mediagoblin/mediagoblin/media_types/image/processing.py", line 22, in <module>
    import Image
ImportError: No module named 'Image'

 

The fix:

pi@pi:/ $ sudo pip3 install lxml
Collecting lxml
  Downloading https://www.piwheels.hostedpi.com/simple/lxml/lxml-4.1.1-cp35-cp35m-linux_armv7l.whl (4.9MB)
    100% |████████████████████████████████| 4.9MB 31kB/s 
Installing collected packages: lxml
Successfully installed lxml-4.1.1
pi@pi:/ $ sudo pip3 install Image
Collecting Image
  Downloading image-1.5.17-py2.py3-none-any.whl
Collecting pillow (from Image)
  Downloading https://www.piwheels.hostedpi.com/simple/pillow/Pillow-5.0.0-cp35-cp35m-linux_armv7l.whl (1.0MB)
    100% |████████████████████████████████| 1.0MB 73kB/s 
Collecting django (from Image)
  Downloading Django-2.0.2-py3-none-any.whl (7.1MB)
    100% |████████████████████████████████| 7.1MB 22kB/s 
Collecting pytz (from django->Image)
  Downloading pytz-2018.3-py2.py3-none-any.whl (509kB)
    100% |████████████████████████████████| 512kB 272kB/s 
Installing collected packages: pillow, pytz, django, Image
Successfully installed Image-1.5.17 django-2.0.2 pillow-5.0.0 pytz-2018.3
pi@pi:/ $ 

 

Re run the database init and start to test mediagoblin:

mediagoblin@pi:/srv/mediagoblin/mediagoblin$ ./bin/gmg dbupdate
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.runtime.migration] Running upgrade  -> 52bf0ccbedc1, initial revision
INFO  [alembic.runtime.migration] Running upgrade 52bf0ccbedc1 -> a98c1a320e88, Image media type initial migration
INFO  [alembic.runtime.migration] Running upgrade 52bf0ccbedc1 -> 101510e3a713, #5382 Removes graveyard items from collections
INFO  [alembic.runtime.migration] Running upgrade 101510e3a713 -> 8429e33fdf7, Remove the Graveyard objects from CommentNotification objects
INFO  [alembic.runtime.migration] Running upgrade 8429e33fdf7 -> 4066b9f8b84a, use_comment_link_ids_notifications
INFO  [alembic.runtime.migration] Running upgrade 4066b9f8b84a -> 3145accb8fe3, remove tombstone comment wrappers
INFO  [alembic.runtime.migration] Running upgrade 3145accb8fe3 -> 228916769bd2, ensure Report.object_id is nullable
Laying foundations for __main__:
   + Laying foundations for Privilege table
mediagoblin@pi:/srv/mediagoblin/mediagoblin$
mediagoblin@pi:/srv/mediagoblin/mediagoblin$ ./lazyserver.sh --server-name=broadcast
Using paster config: paste_local.ini
Using ./bin/paster
+ export CELERY_ALWAYS_EAGER=true
+ ./bin/paster serve paste_local.ini --server-name=broadcast --reload
Starting subprocess with file monitor
2018-02-09 21:52:02,831 INFO    [mediagoblin.app] GNU MediaGoblin 0.9.0 main server starting
2018-02-09 21:52:03,894 INFO    [mediagoblin.tools.crypto] Created /srv/mediagoblin/mediagoblin/user_dev/crypto
2018-02-09 21:52:03,898 INFO    [mediagoblin.tools.crypto] Saved new key for It's Dangerous
2018-02-09 21:52:04,784 INFO    [mediagoblin.app] Setting up plugins.
2018-02-09 21:52:04,785 INFO    [mediagoblin.init.plugins] Importing plugin module: mediagoblin.plugins.geolocation
2018-02-09 21:52:04,786 INFO    [mediagoblin.init.plugins] Importing plugin module: mediagoblin.plugins.basic_auth
2018-02-09 21:52:04,788 INFO    [mediagoblin.init.plugins] Importing plugin module: mediagoblin.plugins.processing_info
2018-02-09 21:52:04,789 INFO    [mediagoblin.init.plugins] Importing plugin module: mediagoblin.media_types.image
2018-02-09 21:52:05,701 INFO    [mediagoblin.init.celery] Setting celery configuration from object "mediagoblin.init.celery.dummy_settings_module"
Starting server in PID 21343.
Serving on http://localhost:6543

 

Visit your PI’s IP address and you should see the mediagoblin front page.

We will now configure extra plugins like Video, Audio, PDF, ASCII and RAW Image. Based on this tutorial : https://mediagoblin.readthedocs.io/en/stable/siteadmin/media-types.html

Edit the mediagoblin_local.ini and append to plugins. Make sure to stop mediagoblin.

[plugins]
[[mediagoblin.media_types.image]]
[[mediagoblin.media_types.video]]
[[mediagoblin.media_types.pdf]]
[[mediagoblin.media_types.ascii]]
[[mediagoblin.media_types.raw_image]]
[[mediagoblin.media_types.audio]]

Let us install the requirements to use video and raw image:

$ sudo apt-get install python-gi python3-gi \
    gstreamer1.0-tools \
    gir1.2-gstreamer-1.0 \
    gir1.2-gst-plugins-base-1.0 \
    gstreamer1.0-plugins-good \
    gstreamer1.0-plugins-ugly \
    gstreamer1.0-plugins-bad \
    gstreamer1.0-libav \
    python-gst-1.0 \
    python-pyexiv2

Audio:

$ sudo apt-get install python-gst-1.0 gstreamer1.0-plugins-{base,bad,good,ugly} \
gstreamer1.0-libav python-numpy python-scipy libsndfile1-dev libasound2-dev libatlas-base-dev

Note

scikits.audiolab will display a warning every time it’s imported if you do not compile it with alsa support. Alsa support is not necessary for the GNU MediaGoblin application.

Then install scikits.audiolab for the spectrograms:

$ ./bin/pip install scikits.audiolab



Collecting scikits.audiolab
  Using cached scikits.audiolab-0.11.0.tar.gz
Requirement already satisfied: numpy in /usr/local/lib/python3.5/dist-packages (from scikits.audiolab)
Building wheels for collected packages: scikits.audiolab
  Running setup.py bdist_wheel for scikits.audiolab ... done
  Stored in directory: /mnt/MEDIA/mediagoblin/.cache/pip/wheels/f7/33/b5/64aae3ff8084c7159026aa8fb6a1e63d9ed7b5ac2de104ae92
Successfully built scikits.audiolab
Installing collected packages: scikits.audiolab
Successfully installed scikits.audiolab-0.11.0

To user ascii art install the library:

$ ./bin/easy_install chardet

 

OUTPUT:

$ sudo apt-get install python-gi python3-gi     gstreamer1.0-tools     gir1.2-gstreamer-1.0     gir1.2-gst-plugins-base-1.0     gstreamer1.0-plugins-good     gstreamer1.0-plugins-ugly     gstreamer1.0-plugins-bad     gstreamer1.0-libav     python-gst-1.0 -y
Reading package lists... Done
Building dependency tree       
Reading state information... Done
python-gi is already the newest version (3.22.0-2).
python-gi set to manually installed.
python3-gi is already the newest version (3.22.0-2).
python3-gi set to manually installed.
The following additional packages will be installed:
  adwaita-icon-theme at-spi2-core dconf-gsettings-backend dconf-service glib-networking glib-networking-common
  glib-networking-services gsettings-desktop-schemas gstreamer1.0-plugins-base gstreamer1.0-x libatk-bridge2.0-0 libatspi2.0-0
  libcairo-gobject2 libcdparanoia0 libcolord2 libdconf1 libde265-0 libepoxy0 libgstreamer-plugins-bad1.0-0
  libgstreamer-plugins-base1.0-0 libgstreamer1.0-0 libgtk-3-0 libgtk-3-bin libgtk-3-common libjson-glib-1.0-0 libjson-glib-1.0-common
  liblilv-0-0 libmjpegutils-2.1-0 libmpeg2encpp-2.1-0 libmplex2-2.1-0 libofa0 libopencv-calib3d2.4v5 libopencv-features2d2.4v5
  libopencv-flann2.4v5 libopencv-highgui2.4-deb0 libopencv-objdetect2.4v5 libopencv-video2.4v5 librest-0.7-0 libsbc1 libserd-0-0
  libsidplay1v5 libsord-0-0 libsoundtouch1 libsoup-gnome2.4-1 libsoup2.4-1 libspandsp2 libsratom-0-0 libsrtp0 libvisual-0.4-0
  libvo-aacenc0 libvo-amrwbenc0 libwebrtc-audio-processing1 libzbar0
Suggested packages:
  frei0r-plugins gvfs colord libvisual-0.4-plugins serdi sidplay-base sordi srtp-utils
The following NEW packages will be installed:
  adwaita-icon-theme at-spi2-core dconf-gsettings-backend dconf-service gir1.2-gst-plugins-base-1.0 gir1.2-gstreamer-1.0
  glib-networking glib-networking-common glib-networking-services gsettings-desktop-schemas gstreamer1.0-libav
  gstreamer1.0-plugins-bad gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-tools
  gstreamer1.0-x libatk-bridge2.0-0 libatspi2.0-0 libcairo-gobject2 libcdparanoia0 libcolord2 libdconf1 libde265-0 libepoxy0
  libgstreamer-plugins-bad1.0-0 libgstreamer-plugins-base1.0-0 libgstreamer1.0-0 libgtk-3-0 libgtk-3-bin libgtk-3-common
  libjson-glib-1.0-0 libjson-glib-1.0-common liblilv-0-0 libmjpegutils-2.1-0 libmpeg2encpp-2.1-0 libmplex2-2.1-0 libofa0
  libopencv-calib3d2.4v5 libopencv-features2d2.4v5 libopencv-flann2.4v5 libopencv-highgui2.4-deb0 libopencv-objdetect2.4v5
  libopencv-video2.4v5 librest-0.7-0 libsbc1 libserd-0-0 libsidplay1v5 libsord-0-0 libsoundtouch1 libsoup-gnome2.4-1 libsoup2.4-1
  libspandsp2 libsratom-0-0 libsrtp0 libvisual-0.4-0 libvo-aacenc0 libvo-amrwbenc0 libwebrtc-audio-processing1 libzbar0
  python-gst-1.0
0 upgraded, 61 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/38.5 MB of archives.
After this operation, 110 MB of additional disk space will be used.
Extracting templates from packages: 100%
Selecting previously unselected package libcdparanoia0:armhf.
(Reading database ... 116534 files and directories currently installed.)
Preparing to unpack .../00-libcdparanoia0_3.10.2+debian-11_armhf.deb ...
Unpacking libcdparanoia0:armhf (3.10.2+debian-11) ...
Selecting previously unselected package libvo-aacenc0:armhf.
Preparing to unpack .../01-libvo-aacenc0_0.1.3-1_armhf.deb ...
Unpacking libvo-aacenc0:armhf (0.1.3-1) ...
Selecting previously unselected package libvo-amrwbenc0:armhf.
Preparing to unpack .../02-libvo-amrwbenc0_0.1.3-1_armhf.deb ...
Unpacking libvo-amrwbenc0:armhf (0.1.3-1) ...
Selecting previously unselected package adwaita-icon-theme.
Preparing to unpack .../03-adwaita-icon-theme_3.22.0-1+deb9u1_all.deb ...
Unpacking adwaita-icon-theme (3.22.0-1+deb9u1) ...
Selecting previously unselected package libatspi2.0-0:armhf.
Preparing to unpack .../04-libatspi2.0-0_2.22.0-6+deb9u1_armhf.deb ...
Unpacking libatspi2.0-0:armhf (2.22.0-6+deb9u1) ...
Selecting previously unselected package at-spi2-core.
Preparing to unpack .../05-at-spi2-core_2.22.0-6+deb9u1_armhf.deb ...
Unpacking at-spi2-core (2.22.0-6+deb9u1) ...
Selecting previously unselected package libdconf1:armhf.
Preparing to unpack .../06-libdconf1_0.26.0-2_armhf.deb ...
Unpacking libdconf1:armhf (0.26.0-2) ...
Selecting previously unselected package dconf-service.
Preparing to unpack .../07-dconf-service_0.26.0-2_armhf.deb ...
Unpacking dconf-service (0.26.0-2) ...
Selecting previously unselected package dconf-gsettings-backend:armhf.
Preparing to unpack .../08-dconf-gsettings-backend_0.26.0-2_armhf.deb ...
Unpacking dconf-gsettings-backend:armhf (0.26.0-2) ...
Selecting previously unselected package libgstreamer1.0-0:armhf.
Preparing to unpack .../09-libgstreamer1.0-0_1.10.4-1_armhf.deb ...
Unpacking libgstreamer1.0-0:armhf (1.10.4-1) ...
Selecting previously unselected package gir1.2-gstreamer-1.0.
Preparing to unpack .../10-gir1.2-gstreamer-1.0_1.10.4-1_armhf.deb ...
Unpacking gir1.2-gstreamer-1.0 (1.10.4-1) ...
Selecting previously unselected package libgstreamer-plugins-base1.0-0:armhf.
Preparing to unpack .../11-libgstreamer-plugins-base1.0-0_1.10.4-1_armhf.deb ...
Unpacking libgstreamer-plugins-base1.0-0:armhf (1.10.4-1) ...
Selecting previously unselected package gir1.2-gst-plugins-base-1.0.
Preparing to unpack .../12-gir1.2-gst-plugins-base-1.0_1.10.4-1_armhf.deb ...
Unpacking gir1.2-gst-plugins-base-1.0 (1.10.4-1) ...
Selecting previously unselected package glib-networking-common.
Preparing to unpack .../13-glib-networking-common_2.50.0-1_all.deb ...
Unpacking glib-networking-common (2.50.0-1) ...
Selecting previously unselected package glib-networking-services.
Preparing to unpack .../14-glib-networking-services_2.50.0-1_armhf.deb ...
Unpacking glib-networking-services (2.50.0-1) ...
Selecting previously unselected package gsettings-desktop-schemas.
Preparing to unpack .../15-gsettings-desktop-schemas_3.22.0-1_all.deb ...
Unpacking gsettings-desktop-schemas (3.22.0-1) ...
Selecting previously unselected package glib-networking:armhf.
Preparing to unpack .../16-glib-networking_2.50.0-1_armhf.deb ...
Unpacking glib-networking:armhf (2.50.0-1) ...
Selecting previously unselected package gstreamer1.0-libav:armhf.
Preparing to unpack .../17-gstreamer1.0-libav_1.10.4-1_armhf.deb ...
Unpacking gstreamer1.0-libav:armhf (1.10.4-1) ...
Selecting previously unselected package libvisual-0.4-0:armhf.
Preparing to unpack .../18-libvisual-0.4-0_0.4.0-10_armhf.deb ...
Unpacking libvisual-0.4-0:armhf (0.4.0-10) ...
Selecting previously unselected package gstreamer1.0-plugins-base:armhf.
Preparing to unpack .../19-gstreamer1.0-plugins-base_1.10.4-1_armhf.deb ...
Unpacking gstreamer1.0-plugins-base:armhf (1.10.4-1) ...
Selecting previously unselected package libcairo-gobject2:armhf.
Preparing to unpack .../20-libcairo-gobject2_1.14.8-1+rpi1_armhf.deb ...
Unpacking libcairo-gobject2:armhf (1.14.8-1+rpi1) ...
Selecting previously unselected package libsoup2.4-1:armhf.
Preparing to unpack .../21-libsoup2.4-1_2.56.0-2+deb9u1_armhf.deb ...
Unpacking libsoup2.4-1:armhf (2.56.0-2+deb9u1) ...
Selecting previously unselected package gstreamer1.0-plugins-good:armhf.
Preparing to unpack .../22-gstreamer1.0-plugins-good_1.10.4-1_armhf.deb ...
Unpacking gstreamer1.0-plugins-good:armhf (1.10.4-1) ...
Selecting previously unselected package libsidplay1v5.
Preparing to unpack .../23-libsidplay1v5_1.36.59-10_armhf.deb ...
Unpacking libsidplay1v5 (1.36.59-10) ...
Selecting previously unselected package gstreamer1.0-plugins-ugly:armhf.
Preparing to unpack .../24-gstreamer1.0-plugins-ugly_1.10.4-1_armhf.deb ...
Unpacking gstreamer1.0-plugins-ugly:armhf (1.10.4-1) ...
Selecting previously unselected package gstreamer1.0-tools.
Preparing to unpack .../25-gstreamer1.0-tools_1.10.4-1_armhf.deb ...
Unpacking gstreamer1.0-tools (1.10.4-1) ...
Selecting previously unselected package gstreamer1.0-x:armhf.
Preparing to unpack .../26-gstreamer1.0-x_1.10.4-1_armhf.deb ...
Unpacking gstreamer1.0-x:armhf (1.10.4-1) ...
Selecting previously unselected package libatk-bridge2.0-0:armhf.
Preparing to unpack .../27-libatk-bridge2.0-0_2.22.0-2_armhf.deb ...
Unpacking libatk-bridge2.0-0:armhf (2.22.0-2) ...
Selecting previously unselected package libcolord2:armhf.
Preparing to unpack .../28-libcolord2_1.3.3-2_armhf.deb ...
Unpacking libcolord2:armhf (1.3.3-2) ...
Selecting previously unselected package libde265-0:armhf.
Preparing to unpack .../29-libde265-0_1.0.2-2+rpi1+b4_armhf.deb ...
Unpacking libde265-0:armhf (1.0.2-2+rpi1+b4) ...
Selecting previously unselected package libepoxy0:armhf.
Preparing to unpack .../30-libepoxy0_1.3.1-2_armhf.deb ...
Unpacking libepoxy0:armhf (1.3.1-2) ...
Selecting previously unselected package libgtk-3-common.
Preparing to unpack .../31-libgtk-3-common_3.22.11-1+rpi3_all.deb ...
Unpacking libgtk-3-common (3.22.11-1+rpi3) ...
Selecting previously unselected package libjson-glib-1.0-common.
Preparing to unpack .../32-libjson-glib-1.0-common_1.2.6-1_all.deb ...
Unpacking libjson-glib-1.0-common (1.2.6-1) ...
Selecting previously unselected package libjson-glib-1.0-0:armhf.
Preparing to unpack .../33-libjson-glib-1.0-0_1.2.6-1_armhf.deb ...
Unpacking libjson-glib-1.0-0:armhf (1.2.6-1) ...
Selecting previously unselected package libsoup-gnome2.4-1:armhf.
Preparing to unpack .../34-libsoup-gnome2.4-1_2.56.0-2+deb9u1_armhf.deb ...
Unpacking libsoup-gnome2.4-1:armhf (2.56.0-2+deb9u1) ...
Selecting previously unselected package librest-0.7-0:armhf.
Preparing to unpack .../35-librest-0.7-0_0.8.0-2_armhf.deb ...
Unpacking librest-0.7-0:armhf (0.8.0-2) ...
Selecting previously unselected package libgtk-3-0:armhf.
Preparing to unpack .../36-libgtk-3-0_3.22.11-1+rpi3_armhf.deb ...
Unpacking libgtk-3-0:armhf (3.22.11-1+rpi3) ...
Selecting previously unselected package libgtk-3-bin.
Preparing to unpack .../37-libgtk-3-bin_3.22.11-1+rpi3_armhf.deb ...
Unpacking libgtk-3-bin (3.22.11-1+rpi3) ...
Selecting previously unselected package libserd-0-0:armhf.
Preparing to unpack .../38-libserd-0-0_0.26.0~dfsg0-1_armhf.deb ...
Unpacking libserd-0-0:armhf (0.26.0~dfsg0-1) ...
Selecting previously unselected package libsord-0-0:armhf.
Preparing to unpack .../39-libsord-0-0_0.16.0~dfsg0-1_armhf.deb ...
Unpacking libsord-0-0:armhf (0.16.0~dfsg0-1) ...
Selecting previously unselected package libsratom-0-0:armhf.
Preparing to unpack .../40-libsratom-0-0_0.6.0~dfsg0-1_armhf.deb ...
Unpacking libsratom-0-0:armhf (0.6.0~dfsg0-1) ...
Selecting previously unselected package liblilv-0-0.
Preparing to unpack .../41-liblilv-0-0_0.24.2~dfsg0-1_armhf.deb ...
Unpacking liblilv-0-0 (0.24.2~dfsg0-1) ...
Selecting previously unselected package libmjpegutils-2.1-0.
Preparing to unpack .../42-libmjpegutils-2.1-0_1%3a2.1.0+debian-5_armhf.deb ...
Unpacking libmjpegutils-2.1-0 (1:2.1.0+debian-5) ...
Selecting previously unselected package libmpeg2encpp-2.1-0.
Preparing to unpack .../43-libmpeg2encpp-2.1-0_1%3a2.1.0+debian-5_armhf.deb ...
Unpacking libmpeg2encpp-2.1-0 (1:2.1.0+debian-5) ...
Selecting previously unselected package libmplex2-2.1-0.
Preparing to unpack .../44-libmplex2-2.1-0_1%3a2.1.0+debian-5_armhf.deb ...
Unpacking libmplex2-2.1-0 (1:2.1.0+debian-5) ...
Selecting previously unselected package libofa0:armhf.
Preparing to unpack .../45-libofa0_0.9.3-15_armhf.deb ...
Unpacking libofa0:armhf (0.9.3-15) ...
Selecting previously unselected package libopencv-flann2.4v5:armhf.
Preparing to unpack .../46-libopencv-flann2.4v5_2.4.9.1+dfsg1-2_armhf.deb ...
Unpacking libopencv-flann2.4v5:armhf (2.4.9.1+dfsg1-2) ...
Selecting previously unselected package libopencv-highgui2.4-deb0:armhf.
Preparing to unpack .../47-libopencv-highgui2.4-deb0_2.4.9.1+dfsg1-2_armhf.deb ...
Unpacking libopencv-highgui2.4-deb0:armhf (2.4.9.1+dfsg1-2) ...
Selecting previously unselected package libopencv-features2d2.4v5:armhf.
Preparing to unpack .../48-libopencv-features2d2.4v5_2.4.9.1+dfsg1-2_armhf.deb ...
Unpacking libopencv-features2d2.4v5:armhf (2.4.9.1+dfsg1-2) ...
Selecting previously unselected package libopencv-calib3d2.4v5:armhf.
Preparing to unpack .../49-libopencv-calib3d2.4v5_2.4.9.1+dfsg1-2_armhf.deb ...
Unpacking libopencv-calib3d2.4v5:armhf (2.4.9.1+dfsg1-2) ...
Selecting previously unselected package libopencv-objdetect2.4v5:armhf.
Preparing to unpack .../50-libopencv-objdetect2.4v5_2.4.9.1+dfsg1-2_armhf.deb ...
Unpacking libopencv-objdetect2.4v5:armhf (2.4.9.1+dfsg1-2) ...
Selecting previously unselected package libopencv-video2.4v5:armhf.
Preparing to unpack .../51-libopencv-video2.4v5_2.4.9.1+dfsg1-2_armhf.deb ...
Unpacking libopencv-video2.4v5:armhf (2.4.9.1+dfsg1-2) ...
Selecting previously unselected package libsoundtouch1:armhf.
Preparing to unpack .../52-libsoundtouch1_1.9.2-2_armhf.deb ...
Unpacking libsoundtouch1:armhf (1.9.2-2) ...
Selecting previously unselected package libspandsp2:armhf.
Preparing to unpack .../53-libspandsp2_0.0.6+dfsg-0.1_armhf.deb ...
Unpacking libspandsp2:armhf (0.0.6+dfsg-0.1) ...
Selecting previously unselected package libsrtp0.
Preparing to unpack .../54-libsrtp0_1.4.5~20130609~dfsg-2_armhf.deb ...
Unpacking libsrtp0 (1.4.5~20130609~dfsg-2) ...
Selecting previously unselected package libwebrtc-audio-processing1:armhf.
Preparing to unpack .../55-libwebrtc-audio-processing1_0.3-1_armhf.deb ...
Unpacking libwebrtc-audio-processing1:armhf (0.3-1) ...
Selecting previously unselected package libzbar0:armhf.
Preparing to unpack .../56-libzbar0_0.10+doc-10.1_armhf.deb ...
Unpacking libzbar0:armhf (0.10+doc-10.1) ...
Selecting previously unselected package python-gst-1.0.
Preparing to unpack .../57-python-gst-1.0_1.10.4-1_armhf.deb ...
Unpacking python-gst-1.0 (1.10.4-1) ...
Selecting previously unselected package libgstreamer-plugins-bad1.0-0:armhf.
Preparing to unpack .../58-libgstreamer-plugins-bad1.0-0_1.10.4-1_armhf.deb ...
Unpacking libgstreamer-plugins-bad1.0-0:armhf (1.10.4-1) ...
Selecting previously unselected package libsbc1:armhf.
Preparing to unpack .../59-libsbc1_1.3-2_armhf.deb ...
Unpacking libsbc1:armhf (1.3-2) ...
Selecting previously unselected package gstreamer1.0-plugins-bad:armhf.
Preparing to unpack .../60-gstreamer1.0-plugins-bad_1.10.4-1_armhf.deb ...
Unpacking gstreamer1.0-plugins-bad:armhf (1.10.4-1) ...
Setting up libsbc1:armhf (1.3-2) ...
Setting up libjson-glib-1.0-common (1.2.6-1) ...
Setting up libsidplay1v5 (1.36.59-10) ...
Setting up glib-networking-common (2.50.0-1) ...
Setting up libgstreamer1.0-0:armhf (1.10.4-1) ...
Setcap worked! gst-ptp-helper is not suid!
Setting up libde265-0:armhf (1.0.2-2+rpi1+b4) ...
Setting up libzbar0:armhf (0.10+doc-10.1) ...
Setting up libatspi2.0-0:armhf (2.22.0-6+deb9u1) ...
Setting up at-spi2-core (2.22.0-6+deb9u1) ...

Configuration file '/etc/X11/Xsession.d/90qt-a11y'
 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** 90qt-a11y (Y/I/N/O/D/Z) [default=N] ? Y
Installing new version of config file /etc/X11/Xsession.d/90qt-a11y ...

Configuration file '/etc/xdg/autostart/at-spi-dbus-bus.desktop'
 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** at-spi-dbus-bus.desktop (Y/I/N/O/D/Z) [default=N] ? Y
Installing new version of config file /etc/xdg/autostart/at-spi-dbus-bus.desktop ...
Processing triggers for libglib2.0-0:armhf (2.50.3-2) ...
Setting up libwebrtc-audio-processing1:armhf (0.3-1) ...
Setting up libcairo-gobject2:armhf (1.14.8-1+rpi1) ...
Setting up libspandsp2:armhf (0.0.6+dfsg-0.1) ...
Setting up glib-networking-services (2.50.0-1) ...
Setting up libcdparanoia0:armhf (3.10.2+debian-11) ...
Setting up libsrtp0 (1.4.5~20130609~dfsg-2) ...
Setting up gstreamer1.0-tools (1.10.4-1) ...
Setting up libjson-glib-1.0-0:armhf (1.2.6-1) ...
Setting up libopencv-highgui2.4-deb0:armhf (2.4.9.1+dfsg1-2) ...
Setting up libvo-aacenc0:armhf (0.1.3-1) ...
Setting up libmjpegutils-2.1-0 (1:2.1.0+debian-5) ...
Setting up libvo-amrwbenc0:armhf (0.1.3-1) ...
Processing triggers for libc-bin (2.24-11+deb9u1) ...
Setting up libepoxy0:armhf (1.3.1-2) ...
Processing triggers for doc-base (0.10.7) ...
Processing 1 added doc-base file...
Setting up libatk-bridge2.0-0:armhf (2.22.0-2) ...
Setting up libofa0:armhf (0.9.3-15) ...
Setting up libvisual-0.4-0:armhf (0.4.0-10) ...
Setting up libdconf1:armhf (0.26.0-2) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up libcolord2:armhf (1.3.3-2) ...
Setting up libsoundtouch1:armhf (1.9.2-2) ...
Setting up libopencv-objdetect2.4v5:armhf (2.4.9.1+dfsg1-2) ...
Setting up libopencv-flann2.4v5:armhf (2.4.9.1+dfsg1-2) ...
Setting up libserd-0-0:armhf (0.26.0~dfsg0-1) ...
Setting up libopencv-video2.4v5:armhf (2.4.9.1+dfsg1-2) ...
Setting up gir1.2-gstreamer-1.0 (1.10.4-1) ...
Setting up libmplex2-2.1-0 (1:2.1.0+debian-5) ...
Setting up adwaita-icon-theme (3.22.0-1+deb9u1) ...
update-alternatives: warning: /etc/alternatives/x-cursor-theme has been changed (manually or by a script); switching to manual updates only
update-alternatives: warning: forcing reinstallation of alternative /usr/share/icons/Adwaita/cursor.theme because link group x-cursor-theme is broken
Setting up libgstreamer-plugins-base1.0-0:armhf (1.10.4-1) ...
Setting up gstreamer1.0-plugins-base:armhf (1.10.4-1) ...
Setting up gstreamer1.0-libav:armhf (1.10.4-1) ...
Setting up libmpeg2encpp-2.1-0 (1:2.1.0+debian-5) ...
Setting up dconf-service (0.26.0-2) ...
Setting up gir1.2-gst-plugins-base-1.0 (1.10.4-1) ...
Setting up libsord-0-0:armhf (0.16.0~dfsg0-1) ...
Setting up libopencv-features2d2.4v5:armhf (2.4.9.1+dfsg1-2) ...
Setting up libgstreamer-plugins-bad1.0-0:armhf (1.10.4-1) ...
Setting up python-gst-1.0 (1.10.4-1) ...
Setting up gstreamer1.0-plugins-ugly:armhf (1.10.4-1) ...
Setting up gstreamer1.0-x:armhf (1.10.4-1) ...
Setting up dconf-gsettings-backend:armhf (0.26.0-2) ...
Setting up libsratom-0-0:armhf (0.6.0~dfsg0-1) ...
Setting up libopencv-calib3d2.4v5:armhf (2.4.9.1+dfsg1-2) ...
Setting up liblilv-0-0 (0.24.2~dfsg0-1) ...
Setting up gsettings-desktop-schemas (3.22.0-1) ...
Setting up libgtk-3-common (3.22.11-1+rpi3) ...
Setting up glib-networking:armhf (2.50.0-1) ...
Setting up libsoup2.4-1:armhf (2.56.0-2+deb9u1) ...
Setting up libsoup-gnome2.4-1:armhf (2.56.0-2+deb9u1) ...
Setting up librest-0.7-0:armhf (0.8.0-2) ...
Setting up gstreamer1.0-plugins-good:armhf (1.10.4-1) ...
Setting up libgtk-3-0:armhf (3.22.11-1+rpi3) ...
Setting up gstreamer1.0-plugins-bad:armhf (1.10.4-1) ...
Setting up libgtk-3-bin (3.22.11-1+rpi3) ...
Processing triggers for libc-bin (2.24-11+deb9u1) ...
$ sudo apt-get install python-pyexiv2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libboost-python1.58.0 libexiv2-14 libjs-sphinxdoc python-pyexiv2-doc
Suggested packages:
  exiv2
The following NEW packages will be installed:
  libboost-python1.58.0 libexiv2-14 libjs-sphinxdoc python-pyexiv2 python-pyexiv2-doc
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 979 kB of archives.
After this operation, 3,914 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirror.pregi.net/raspbian/raspbian stretch/main armhf libboost-python1.58.0 armhf 1.58.0+dfsg-5.1+rpi1+b1 [125 kB]
Get:2 http://mirror.pregi.net/raspbian/raspbian stretch/main armhf libexiv2-14 armhf 0.25-3.1 [618 kB]
Get:3 http://mirror.pregi.net/raspbian/raspbian stretch/main armhf libjs-sphinxdoc all 1.4.9-2 [69.5 kB]
Get:4 http://mirror.pregi.net/raspbian/raspbian stretch/main armhf python-pyexiv2 armhf 0.3.2-8+b1 [73.4 kB]
Get:5 http://mirror.pregi.net/raspbian/raspbian stretch/main armhf python-pyexiv2-doc all 0.3.2-8 [93.0 kB]
Fetched 979 kB in 3s (255 kB/s)              
Selecting previously unselected package libboost-python1.58.0.
(Reading database ... 123529 files and directories currently installed.)
Preparing to unpack .../libboost-python1.58.0_1.58.0+dfsg-5.1+rpi1+b1_armhf.deb ...
Unpacking libboost-python1.58.0 (1.58.0+dfsg-5.1+rpi1+b1) ...
Selecting previously unselected package libexiv2-14:armhf.
Preparing to unpack .../libexiv2-14_0.25-3.1_armhf.deb ...
Unpacking libexiv2-14:armhf (0.25-3.1) ...
Selecting previously unselected package libjs-sphinxdoc.
Preparing to unpack .../libjs-sphinxdoc_1.4.9-2_all.deb ...
Unpacking libjs-sphinxdoc (1.4.9-2) ...
Selecting previously unselected package python-pyexiv2.
Preparing to unpack .../python-pyexiv2_0.3.2-8+b1_armhf.deb ...
Unpacking python-pyexiv2 (0.3.2-8+b1) ...
Selecting previously unselected package python-pyexiv2-doc.
Preparing to unpack .../python-pyexiv2-doc_0.3.2-8_all.deb ...
Unpacking python-pyexiv2-doc (0.3.2-8) ...
Setting up libexiv2-14:armhf (0.25-3.1) ...
Setting up libjs-sphinxdoc (1.4.9-2) ...
Processing triggers for libc-bin (2.24-11+deb9u1) ...
Processing triggers for doc-base (0.10.7) ...
Processing 1 added doc-base file...
Setting up libboost-python1.58.0 (1.58.0+dfsg-5.1+rpi1+b1) ...
Setting up python-pyexiv2-doc (0.3.2-8) ...
Setting up python-pyexiv2 (0.3.2-8+b1) ...
Processing triggers for libc-bin (2.24-11+deb9u1) ...
$ sudo apt install poppler-utils
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libpoppler64
The following NEW packages will be installed:
  libpoppler64 poppler-utils
0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,305 kB of archives.
After this operation, 3,053 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirror.pregi.net/raspbian/raspbian stretch/main armhf libpoppler64 armhf 0.48.0-2+deb9u2 [1,165 kB]
Get:2 http://mirror.pregi.net/raspbian/raspbian stretch/main armhf poppler-utils armhf 0.48.0-2+deb9u2 [140 kB]
Fetched 1,305 kB in 3s (356 kB/s)      
Selecting previously unselected package libpoppler64:armhf.
(Reading database ... 123619 files and directories currently installed.)
Preparing to unpack .../libpoppler64_0.48.0-2+deb9u2_armhf.deb ...
Unpacking libpoppler64:armhf (0.48.0-2+deb9u2) ...
Selecting previously unselected package poppler-utils.
Preparing to unpack .../poppler-utils_0.48.0-2+deb9u2_armhf.deb ...
Unpacking poppler-utils (0.48.0-2+deb9u2) ...
Setting up libpoppler64:armhf (0.48.0-2+deb9u2) ...
Processing triggers for libc-bin (2.24-11+deb9u1) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up poppler-utils (0.48.0-2+deb9u2) ...
$ sudo apt-get install python-gst-1.0 gstreamer1.0-plugins-{base,bad,good,ugly} \
> gstreamer1.0-libav python-numpy python-scipy libsndfile1-dev libasound2-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
gstreamer1.0-libav is already the newest version (1.10.4-1).
gstreamer1.0-plugins-bad is already the newest version (1.10.4-1).
gstreamer1.0-plugins-base is already the newest version (1.10.4-1).
gstreamer1.0-plugins-base set to manually installed.
gstreamer1.0-plugins-good is already the newest version (1.10.4-1).
gstreamer1.0-plugins-ugly is already the newest version (1.10.4-1).
python-gst-1.0 is already the newest version (1.10.4-1).
The following additional packages will be installed:
  libflac-dev liblapack3 python-decorator
Suggested packages:
  libasound2-doc gfortran python-nose python-numpy-dbg python-numpy-doc python-scipy-doc
The following NEW packages will be installed:
  libasound2-dev libflac-dev liblapack3 libsndfile1-dev python-decorator python-numpy python-scipy
0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 12.1 MB of archives.
After this operation, 53.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:2 http://archive.raspberrypi.org/debian stretch/main armhf libasound2-dev armhf 1.1.3-5+rpi3 [262 kB]
Get:1 http://mirror.pregi.net/raspbian/raspbian stretch/main armhf libflac-dev armhf 1.3.2-1 [193 kB]                           
Get:3 http://mirror.pregi.net/raspbian/raspbian stretch/main armhf liblapack3 armhf 3.7.0-2 [1,509 kB]                                
Get:4 http://mirror.pregi.net/raspbian/raspbian stretch/main armhf libsndfile1-dev armhf 1.0.27-3 [341 kB]                            
Get:5 http://mirror.pregi.net/raspbian/raspbian stretch/main armhf python-decorator all 4.0.11-1 [13.3 kB]                            
Get:6 http://mirror.pregi.net/raspbian/raspbian stretch/main armhf python-numpy armhf 1:1.12.1-3 [1,694 kB]                           
Get:7 http://mirror.pregi.net/raspbian/raspbian stretch/main armhf python-scipy armhf 0.18.1-2 [8,094 kB]                             
Fetched 12.1 MB in 33s (364 kB/s)                                                                                                     
Selecting previously unselected package libasound2-dev:armhf.
(Reading database ... 123657 files and directories currently installed.)
Preparing to unpack .../0-libasound2-dev_1.1.3-5+rpi3_armhf.deb ...
Unpacking libasound2-dev:armhf (1.1.3-5+rpi3) ...
Selecting previously unselected package libflac-dev:armhf.
Preparing to unpack .../1-libflac-dev_1.3.2-1_armhf.deb ...
Unpacking libflac-dev:armhf (1.3.2-1) ...
Selecting previously unselected package liblapack3.
Preparing to unpack .../2-liblapack3_3.7.0-2_armhf.deb ...
Unpacking liblapack3 (3.7.0-2) ...
Selecting previously unselected package libsndfile1-dev.
Preparing to unpack .../3-libsndfile1-dev_1.0.27-3_armhf.deb ...
Unpacking libsndfile1-dev (1.0.27-3) ...
Selecting previously unselected package python-decorator.
Preparing to unpack .../4-python-decorator_4.0.11-1_all.deb ...
Unpacking python-decorator (4.0.11-1) ...
Selecting previously unselected package python-numpy.
Preparing to unpack .../5-python-numpy_1%3a1.12.1-3_armhf.deb ...
Unpacking python-numpy (1:1.12.1-3) ...
Selecting previously unselected package python-scipy.
Preparing to unpack .../6-python-scipy_0.18.1-2_armhf.deb ...
Unpacking python-scipy (0.18.1-2) ...
Setting up libasound2-dev:armhf (1.1.3-5+rpi3) ...
Setting up liblapack3 (3.7.0-2) ...
update-alternatives: warning: /etc/alternatives/liblapack.so.3 is dangling; it will be updated with best choice
update-alternatives: using /usr/lib/lapack/liblapack.so.3 to provide /usr/lib/liblapack.so.3 (liblapack.so.3) in auto mode
Setting up libflac-dev:armhf (1.3.2-1) ...
Setting up python-numpy (1:1.12.1-3) ...
Processing triggers for doc-base (0.10.7) ...
Processing 1 added doc-base file...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up python-decorator (4.0.11-1) ...
Setting up libsndfile1-dev (1.0.27-3) ...
Setting up python-scipy (0.18.1-2) ...
$ ./bin/easy_install chardet
Searching for chardet
Best match: chardet 3.0.4
Processing chardet-3.0.4-py3.5.egg
chardet 3.0.4 is already the active version in easy-install.pth
Installing chardetect script to /srv/mediagoblin/mediagoblin/bin

Using /srv/mediagoblin/mediagoblin/lib/python3.5/site-packages/chardet-3.0.4-py3.5.egg
Processing dependencies for chardet
Finished processing dependencies for chardet
sudo pip3 install numpy
Collecting numpy
  Downloading https://www.piwheels.hostedpi.com/simple/numpy/numpy-1.14.0-cp35-cp35m-linux_armv7l.whl (6.3MB)
    100% |████████████████████████████████| 6.3MB 25kB/s 
Installing collected packages: numpy
Successfully installed numpy-1.14.0

After all of this re run: (I did have an error on RAW iamge so I disabled that plugin)

$ ./bin/gmg dbupdate

/srv/mediagoblin/mediagoblin/mediagoblin/media_types/video/transcoders.py:37: PyGIWarning: GstPbutils was imported without specifying a version first. Use gi.require_version('GstPbutils', '1.0') before import to ensure that the right version gets loaded.
  from gi.repository import GstPbutils
WARNING: audiolab is not installed so wav2png will not work
sqlalchemy-migrate not found... assuming we don't need it
I hope you aren't running the legacy migrations!
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
INFO  [alembic.runtime.migration] Running upgrade 52bf0ccbedc1 -> e9212d3a12d3, Audio media type initial migration
INFO  [alembic.runtime.migration] Running upgrade 52bf0ccbedc1 -> 72bd70f7eefd, Ascii media type initial migration
INFO  [alembic.runtime.migration] Running upgrade 52bf0ccbedc1 -> faa209f143b5, PDF media type initial migration
INFO  [alembic.runtime.migration] Running upgrade 52bf0ccbedc1 -> 38feb829c545, Video media type initial migration

 

Let us now configure Ngnix:

Generate DH Param ( https://security.stackexchange.com/questions/94390/whats-the-purpose-of-dh-parameters) This may take a while:

$  sudo openssl dhparam --out /etc/nginx/dhparam.pem 2048
.........................................................................................................................+.........................................................................................................................+....................................................................................................+................................................................................................................................................................+.............................................................+....................+......................................................................................................+..............................................................................................................................................................................................+.........................................................................................................................+..........+..........................................................................................................................................................................................................................................................+.................................................+....................+.+...................................................+......................+........................................................................................................................................................................................................................................................................................................................................................+.................................+.....................................................+...............................................................................+.....................................................................+.....+.........+.......+......................................................................................................................................................................................................................................................................................................................................+..........................................................+...+...........................................................+..............................+......................................................................................+..............................................................................................................................................................................................................................+........................................................+...........................................................................+............................................................+.........++*++*

Create a new config: at /srv/mediagoblin/nginx.conf

server {
 #################################################
 # Stock useful config options, but ignore them :)
 #################################################
 include /etc/nginx/mime.types;

# Refer to mozilla config https://mozilla.github.io/server-side-tls/ssl-config-generator/
 listen 443 ssl http2;

    # certs sent to the client in SERVER HELLO are concatenated in ssl_certificate
    ssl_certificate /etc/letsencrypt/live/mysite.mooo.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/mysite.mooo.com/privkey.pem;
    ssl_session_timeout 1d;
    ssl_session_cache shared:SSL:50m;
    ssl_session_tickets off;

    # Diffie-Hellman parameter for DHE ciphersuites, recommended 2048 bits
    ssl_dhparam /etc/nginx/dhparam.pem;

   # intermediate configuration. tweak to your needs.
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:E$
    ssl_prefer_server_ciphers on;

    # OCSP Stapling ---
    # fetch OCSP records from URL in ssl_certificate and cache them
    ssl_stapling on;
    ssl_stapling_verify on;

    ## verify chain of trust of OCSP response using Root CA and Intermediate certs
    #ssl_trusted_certificate /path/to/root_CA_cert_plus_intermediates;

# Refer to https://geekflare.com/nginx-webserver-security-hardening-guide/
add_header X-XSS-Protection "1; mode=block";
if ($request_method !~ ^(GET|HEAD|POST)$ )
{
       return 405;
}

# END MOZ CONF

 autoindex off;
 default_type  application/octet-stream;
 sendfile on;

 # Gzip
 gzip on;
 gzip_min_length 1024;
 gzip_buffers 4 32k;
 gzip_types text/plain application/x-javascript text/javascript text/xml text/css;

 #####################################
 # Mounting MediaGoblin stuff
 # This is the section you should read
 #####################################

 # Change this to update the upload size limit for your users

 client_max_body_size 8m;

 # prevent attacks (someone uploading a .txt file that the browser
 # interprets as an HTML file, etc.)
 add_header X-Content-Type-Options nosniff;

 server_name mysute.mooo.com;
 access_log /var/log/nginx/maccess.log;
 error_log /var/log/nginx/merror.log;

 # MediaGoblin's stock static files: CSS, JS, etc.
 location /mgoblin_static/ {
    alias /srv/mediagoblin/mediagoblin/mediagoblin/static/;
 }


 # Instance specific media: BUG?
 location /mgoblin_media/ {
    #alias /srv/mediagoblin/mediagoblin/user_dev/media/public/;
    alias /mnt/myvar/mediagoblin/media/public/;
 }

 # Theme static files (usually symlinked in)
 location /theme_static/ {
    alias /srv/mediagoblin/mediagoblin/user_dev/theme_static/;
 }

 # Plugin static files (usually symlinked in)
 location /plugin_static/ {
    alias /srv/mediagoblin/mediagoblin/user_dev/plugin_static/;
 }

 # Mounting MediaGoblin itself via FastCGI.
 location / {
    fastcgi_pass 127.0.0.1:26543;
    include /etc/nginx/fastcgi_params;

    # our understanding vs nginx's handling of script_name vs
    # path_info don't match :)
    fastcgi_param PATH_INFO $fastcgi_script_name;
    fastcgi_param SCRIPT_NAME "";
 }
}



Note

The user who owns the Nginx process, normally www-data or nginx, requires execute permission on the directories static, public, theme_static and plugin_static plus all their parent directories. This user also requires read permission on all the files within these directories. This is normally the default.

Enable the config. You may need to disable the default nginx config by removing the file sites-enabled/default:

sudo ln -s /srv/mediagoblin.example.org/nginx.conf /etc/nginx/sites-enabled/

Nginx is now configured to serve the MediaGoblin application. Perform a quick test to ensure that this configuration works:

$ nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

If you encounter any errors, review your nginx configuration files, and try to resolve them. If you do not encounter any errors, you can start your nginx server with one of the following commands (depending on your environment):

$ sudo /etc/init.d/nginx restart
$ sudo /etc/rc.d/nginx restart
$ sudo systemctl restart nginx

Now start MediaGoblin. Use the following command sequence as an example:

$ cd /srv/mediagoblin.example.org/mediagoblin/
$ su mediagoblin -s /bin/bash
$ ./lazyserver.sh --server-name=fcgi fcgi_host=127.0.0.1 fcgi_port=26543
Visit your site and start uploading files!

Using systemd:

Create log directory

sudo mkdir -p /var/log/mediagoblin && sudo chown -hR mediagoblin:mediagoblin /var/log/mediagoblin

Create the systemd service for celery:

$ sudo nano /etc/systemd/system/mediagoblin-celeryd.service 

# Set the WorkingDirectory, Environment and ExecStart values to match your environment.
# If using Debian/*buntu, mkdir and chown are located in /bin/mkdir and /bin/chown, respectively.
# If using Fedora/CentOS/Red Hat, mkdir and chown are located in /usr/bin/mkdir and /usr/bin/chown, respectively.

[Unit]
Description=Mediagoblin Celeryd

[Service]
User=mediagoblin
Group=mediagoblin
Type=simple
WorkingDirectory=/srv/mediagoblin/mediagoblin
# Create directory for PID (if needed) and set ownership
ExecStartPre=/bin/mkdir -p /run/mediagoblin
ExecStartPre=/bin/chown -hR mediagoblin:mediagoblin /run/mediagoblin
# Celery process will run as the `mediagoblin` user after start.
Environment=MEDIAGOBLIN_CONFIG=/srv/mediagoblin/mediagoblin/mediagoblin_local.ini \
            CELERY_CONFIG_MODULE=mediagoblin.init.celery.from_celery
ExecStart=/srv/mediagoblin/mediagoblin/bin/celery worker \
              --logfile=/var/log/mediagoblin/celery.log \
              --loglevel=INFO
PIDFile=/run/mediagoblin/mediagoblin-celeryd.pid

[Install]
WantedBy=multi-user.target

Create another file for paster:

$ sudo nano  /etc/systemd/system/mediagoblin-paster.service
[Unit]
Description=Mediagoblin

[Service]
Type=forking
User=mediagoblin
Group=mediagoblin
Environment=CELERY_ALWAYS_EAGER=false
WorkingDirectory=/srv/mediagoblin/mediagoblin
# Start mg-paster process as root, then switch to mediagoblin user/group
PermissionsStartOnly=true
ExecStartPre=-/bin/mkdir -p /run/mediagoblin
ExecStartPre=/bin/chown -hR mediagoblin:mediagoblin /run/mediagoblin

ExecStart=/srv/mediagoblin/mediagoblin/bin/paster serve \
              /srv/mediagoblin/mediagoblin/paste_local.ini \
              --pid-file=/var/run/mediagoblin/mediagoblin.pid \
              --log-file=/var/log/mediagoblin/mediagoblin.log \
              --daemon \
              --server-name=fcgi fcgi_host=127.0.0.1 fcgi_port=26543
ExecStop=/srv/mediagoblin/mediagoblin/bin/paster serve \
             --pid-file=/var/run/mediagoblin/mediagoblin.pid \
             /srv/mediagoblin/mediagoblin/paste_local.ini stop
PIDFile=/var/run/mediagoblin/mediagoblin.pid

[Install]
WantedBy=multi-user.target

Enable the services at boot and activate:

$ sudo systemctl enable mediagoblin-celeryd.service && sudo systemctl enable mediagoblin-paster.service
$ sudo systemctl daemon-reload

$ sudo systemctl start mediagoblin-paster.service
$ sudo systemctl start mediagoblin-celeryd.service


Created symlink /etc/systemd/system/multi-user.target.wants/mediagoblin-celeryd.service → /etc/systemd/system/mediagoblin-celeryd.service.
Created symlink /etc/systemd/system/multi-user.target.wants/mediagoblin-paster.service → /etc/systemd/system/mediagoblin-paster.service.

If you encounter an error check the status using:

 

$ sudo systemctl status mediagoblin-celeryd.service  
$ sudo systemctl status mediagoblin-paster.service

Mediagoblin should now run automatically in the background.

 

 

 

Except where otherwise noted, this work is licensed under Creative Commons Attribution-ShareAlike 4.0 International License (http://creativecommons.org/licenses/by-sa/4.0/).
I hope that this post is useful to you, if you liked this post you may support me via liberapay. Thank you for your support.

Donate using Liberapay

References:

https://mediagoblin.readthedocs.io/en/stable/siteadmin/deploying.html

https://mediagoblin.readthedocs.io/en/stable/siteadmin/production-deployments.html

https://mediagoblin.readthedocs.io/en/stable/siteadmin/media-types.html

https://mozilla.github.io/server-side-tls/ssl-config-generator/

https://geekflare.com/nginx-webserver-security-hardening-guide/