MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Installing on a Pi Zero

    Scheduled Pinned Locked Moved Troubleshooting
    175 Posts 33 Posters 249.0k Views 33 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • idoodlerI Offline
      idoodler Module Developer @andyc7687
      last edited by

      @andyc7687 I just noticed, is this a server only installation?

      A 1 Reply Last reply Reply Quote 0
      • A Offline
        andyc7687 @idoodler
        last edited by

        @idoodler I didn’t really understand what was the difference between server only and not. This installs magic mirror, runs it as server only and runs three chromium browser on start-up to display it all… functionally I couldn’t tell the difference, but there might be something I’m missing

        1 Reply Last reply Reply Quote 0
        • D Offline
          dazza120
          last edited by

          Pi 3B+ can run the normal magic mirror load file no need to include it in the server only script, just means you need the full fat OS on the Pi

          A 1 Reply Last reply Reply Quote 0
          • A Offline
            andyc7687 @dazza120
            last edited by

            @dazza120 thanks, did you test my script? I was looking at a single installer that would auto detect 2B/3B Or Zero and install the appropriate script, thereby meaning a single repo for all platforms.

            It’s able to detect 3B+ and Zero and does full install for 3B+ and server only for Zero, I don’t have a 3B though to make sure it works on that.

            D 1 Reply Last reply Reply Quote 0
            • D Offline
              dazza120 @andyc7687
              last edited by

              @andyc7687 no mate I done a normal install from the magic mirror bash,I’ve done it twice as I was trying to make the install as light as possible so I was trying to use Stretch with just the basic but it wouldn’t have any of it so had to install the fat version and purge all the bloat ware but from what I’ve looked at so far doesn’t use that much more ram than the lite version, only thing I ended up doing was installing PM2 manually as for some reason it wouldn’t work from the bash after restart.

              1 Reply Last reply Reply Quote 0
              • 1 Offline
                12wsx
                last edited by

                after install on piZero (no W version) everything is ok but serveronly and browser does not start automatically. When I send from terminal:
                cd ~/MagicMirror;
                node serveronly
                server start properly, In browser manually start localhost:8080 showing MagicMirror website properly. What m i missing?

                A 1 Reply Last reply Reply Quote 0
                • A Offline
                  andyc7687 @12wsx
                  last edited by

                  @12wsx straight after installation did you restart the pi zero? It should run, it’s quite a slow start up process though… if you run pm2 show MagicMirror what does it say? It takes a good minute to fire up sometimes…

                  1 Reply Last reply Reply Quote 0
                  • 1 Offline
                    12wsx
                    last edited by

                    Yes i have rebooted and wait about 10min and nothing.
                    pm2 show MagicMirror says:

                    root@raspberrypi:/home/pi/MagicMirror# pm2 show MagicMirror
                    [PM2] Spawning PM2 daemon with pm2_home=/root/.pm2
                    [PM2] PM2 Successfully daemonized
                    [PM2][WARN] MagicMirror doesn't exist
                    root@raspberrypi:/home/pi/MagicMirror#
                    

                    :confused_face:

                    A 1 Reply Last reply Reply Quote 0
                    • A Offline
                      andyc7687 @12wsx
                      last edited by andyc7687

                      @12wsx Did you change the default user to be called root? I’m confused as to why your prompt says root@raspberrypi, but the home directory (/home/pi/MagicMirror) is that instead of /home/root/MagicMirror

                      As I remember, the shell script refers directly to a home drive using the user pi; if you wish to change this on your installation, issue:
                      EDIT: I just noticed I think you’re running off my installer rather than the forked magic mirror repository that I have been testing more recently. The edits are the same, except instead of being in ~/MagicMirror/installers it’ll be in ~/MagicMirror/PiZero, and the files won’t have Pi0 on the end of their names

                      sudo nano ~/MagicMirror/installers/startMagicMirror.sh
                      

                      change the bottom line so instead of pi it is the correct user’s home drive e.g.

                      sh /home/root/MagicMirror/installers/chromium_startPi0.sh
                      

                      Also check pm2_MagicMirrorPi0.json and chromium_startPi0.sh in case they also are pointing to the pi user folder.

                      then do

                      sudo chmod a+x ~/MagicMirror/installers/startMagicMirrorPi0.sh;
                      sudo chmod a+x ~/MagicMirror/installers/pm2_MagicMirrorPi0.json;
                      sudo chmod a+x ~/MagicMirror/installers/chromium_startPi0.sh;
                      

                      to make all the files executable (just in case they aren’t already)

                      Now run:

                      sudo su -c "env PATH=$PATH:/usr/bin pm2 startup systemd -u pi --hp /home/pi"
                      pm2 start ~/MagicMirror/installers/pm2_MagicMirrorPi0.json
                      pm2 save
                      

                      changing the /home/pi to ensure you are in the correct user.
                      Then restart and let me know what happens.

                      That’s the only thing that I can think it could be at the moment

                      1 Reply Last reply Reply Quote 0
                      • B Offline
                        Big11
                        last edited by

                        @andyc7687 said in Installing on a Pi Zero:

                        pm2 start ~/MagicMirror/installers/pm2_MagicMirrorPi0.json

                        Need help…

                        I have installed MM on my PiZero’s many times with no succes to start it just localy and automatically …

                        i followed your script and all seems running well and i did what you decided to autostart with PM2…
                        but it didn’t

                        after rebooting i can see the process “PM2 v3.4.2 GOD” running, but Nothing happens on my screen

                        I tried to start the three startscripts manually and i got an Gtk-Error starting chromium-browser which i can’t work

                        That it basicly works is shown when i start first the xserver manually (startx) and then whitin starting chromium-browser and Point it to http://localhost:8080…

                        What is going wrong?
                        where i can see some Errors ?

                        Thanks a lot…

                        A 1 Reply Last reply Reply Quote 0
                        • A Offline
                          andyc7687 @Big11
                          last edited by

                          @big11 From what I am reading of your reply, are you booting into command line mode? You should be booting into Desktop AutoLogin from sudo raspi-config | Choose option: Boot Options | Choose option: Desktop / CLI | then Desktop Autologin.

                          Can you confirm which install script you ran? Did you run the one from ac2799/MagicMirror or ac2799/MagicMirrorPi0Installer?

                          B 1 Reply Last reply Reply Quote 0
                          • 1 Offline
                            12wsx
                            last edited by 12wsx

                            This post is deleted!
                            1 Reply Last reply Reply Quote 0
                            • 1 Offline
                              12wsx
                              last edited by

                              same problem to me.
                              using raspberry pi Zero (not W)
                              installed latest Raspbian Stretch with desktop. update from first run creator.
                              Full instalation LOG

                              
                              pi@raspberrypi:~ $ bash -c "$(curl -sL https://raw.githubusercontent.com/ac2799/     MagicMirror/master/installers/raspberry.sh)"
                              
                              $$\      $$\                     $$\           $$\      $$\ $$\                                               $$$$$$\
                              $$$\    $$$ |                    \__|          $$$\    $$$ |\__|                                             $$  __$$\
                              $$$$\  $$$$ | $$$$$$\   $$$$$$\  $$\  $$$$$$$\ $$$$\  $$$$ |$$\  $$$$$$\   $$$$$     $\   $$$$$$\   $$$$$$\  \__/  $$ |
                              $$\$$\$$ $$ | \____$$\ $$  __$$\ $$ |$$  _____|$$\$$\$$ $$ |$$ |$$  __$$\ $$  __     $$\ $$  __$$\ $$  __$$\  $$$$$$  |
                              $$ \$$$  $$ | $$$$$$$ |$$ /  $$ |$$ |$$ /      $$ \$$$  $$ |$$ |$$ |  \__|$$ |       \__|$$ /  $$ |$$ |  \__|$$  ____/
                              $$ |\$  /$$ |$$  __$$ |$$ |  $$ |$$ |$$ |      $$ |\$  /$$ |$$ |$$ |      $$ |           $$ |  $$ |$$ |      $$ |
                              $$ | \_/ $$ |\$$$$$$$ |\$$$$$$$ |$$ |\$$$$$$$\ $$ | \_/ $$ |$$ |$$ |      $$ |           \$$$$$$  |$$ |      $$$$$$$$\
                              \__|     \__| \_______| \____$$ |\__| \_______|\__|     \__|\__|\__|      \__|            \______/ \__|      \________|
                                                     $$\   $$ |
                                                     \$$$$$$  |
                                                      \______/
                              
                              If you are running a Pi Zero, installation will continue, but you will have to r     un in server only mode.
                              Updating packages ...
                              Stary:1 http://archive.raspberrypi.org/debian stretch InRelease
                              Stary:2 http://raspbian.raspberrypi.org/raspbian stretch InRelease
                              Czytanie list pakietów... Gotowe
                              Czytanie list pakietów... Gotowe
                              Budowanie drzewa zależności
                              Odczyt informacji o stanie... Gotowe
                              Obliczanie aktualizacji... Gotowe
                              0 aktualizowanych, 0 nowo instalowanych, 0 usuwanych i 0 nieaktualizowanych.
                              E: Nie udało się otworzyć pliku blokady /var/lib/dpkg/lock - open (13: Brak dost     ępu)
                              E: Nie udało się zablokować katalogu administracyjnego (/var/lib/dpkg/), czy uży     to uprawnień administratora?
                              Update failed, carrying on installation ...
                              Installing helper tools ...
                              Czytanie list pakietów... Gotowe
                              Budowanie drzewa zależności
                              Odczyt informacji o stanie... Gotowe
                              build-essential is already the newest version (12.3).
                              curl is already the newest version (7.52.1-5+deb9u8).
                              git is already the newest version (1:2.11.0-3+deb9u4).
                              unzip is already the newest version (6.0-21).
                              wget is already the newest version (1.18-5+deb9u2).
                              0 aktualizowanych, 0 nowo instalowanych, 0 usuwanych i 0 nieaktualizowanych.
                              Check current Node installation ...
                              Node.js is not installed.
                              Installing Node.js ...
                              Downloading node v11.6.0
                                % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                                               Dload  Upload   Total   Spent    Left  Speed
                              100 17.0M  100 17.0M    0     0   861k      0  0:00:20  0:00:20 --:--:--  968k
                              Extracting node v11.6.0
                              Extracting node and npm
                              Czytanie list pakietów... Gotowe
                              Budowanie drzewa zależności
                              Odczyt informacji o stanie... Gotowe
                              git is already the newest version (1:2.11.0-3+deb9u4).
                              0 aktualizowanych, 0 nowo instalowanych, 0 usuwanych i 0 nieaktualizowanych.
                              Czytanie list pakietów... Gotowe
                              Budowanie drzewa zależności
                              Odczyt informacji o stanie... Gotowe
                              Zostaną zainstalowane następujące NOWE pakiety:
                                unclutter
                              0 aktualizowanych, 1 nowo instalowanych, 0 usuwanych i 0 nieaktualizowanych.
                              Konieczne pobranie 16,6 kB archiwów.
                              Po tej operacji zostanie dodatkowo użyte 47,1 kB miejsca na dysku.
                              Pobieranie:1 http://ftp.icm.edu.pl/pub/Linux/distributions/raspbian/raspbian str     etch/main armhf unclutter armhf 8-20 [16,6 kB]
                              Pobrano 16,6 kB w 1s (14,1 kB/s)
                              Prekonfiguracja pakietów ...
                              Wybieranie wcześniej niewybranego pakietu unclutter.
                              (Odczytywanie bazy danych ... 80763 pliki i katalogi obecnie zainstalowane.)
                              Przygotowywanie do rozpakowania pakietu .../unclutter_8-20_armhf.deb ...
                              Rozpakowywanie pakietu unclutter (8-20) ...
                              Konfigurowanie pakietu unclutter (8-20) ...
                              Przetwarzanie wyzwalaczy pakietu man-db (2.7.6.1-2)...
                              Cloning MagicMirror ...
                              Cloning into 'MagicMirror'...
                              remote: Enumerating objects: 305, done.
                              remote: Counting objects: 100% (305/305), done.
                              remote: Compressing objects: 100% (273/273), done.
                              remote: Total 305 (delta 37), reused 169 (delta 22), pack-reused 0
                              Receiving objects: 100% (305/305), 614.71 KiB | 747.00 KiB/s, done.
                              Resolving deltas: 100% (37/37), done.
                              Cloning MagicMirror Done!
                              Installing dependencies ...
                              npx: zainstalowano 405 w 218.392s
                              npm notice CANARY npmc is experimental software. If you find an issue, please fi     le it in the main npm repository, and call out that you were using npmc.
                              npm WARN deprecated time-grunt@2.0.0: Deprecated because Grunt is practically un     maintained. Move on to something better. This package will continue to work with      Grunt v1, but it will not receive any updates.
                              npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@n     pmjs.com for more info.
                              
                              > electron-chromedriver@1.8.0 install /home/pi/MagicMirror/node_modules/electron     -chromedriver
                              > node ./download-chromedriver.js
                              
                              successfully dowloaded and extracted!
                              
                              > electron@2.0.16 postinstall /home/pi/MagicMirror/node_modules/electron
                              > node install.js
                              
                              Downloading SHASUMS256.txt
                              [============================================>] 100.0% of 5.39 kB (5.39 kB/s)
                              
                              > magicmirror@2.6.0 install /home/pi/MagicMirror
                              > cd vendor && npm install
                              
                              npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fse     vents):
                              npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@     1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"}     )
                              
                              added 82 packages from 57 contributors and audited 220 packages in 118.631s
                              found 3 low severity vulnerabilities
                                run `npm audit fix` to fix them, or `npm audit` for details
                              
                              > magicmirror@2.6.0 postinstall /home/pi/MagicMirror
                              > sh installers/postinstall/postinstall.sh && npm run install-fonts
                              
                              MagicMirror installation successful!
                              
                              > magicmirror@2.6.0 install-fonts /home/pi/MagicMirror
                              > cd fonts && npm install
                              
                              added 1 package from 1 contributor and audited 1 package in 42.42s
                              found 0 vulnerabilities
                              
                              npm WARN grunt-stylelint@0.10.1 requires a peer of stylelint@^9.0.0 but none is      installed. You must install peer dependencies yourself.
                              npm WARN acorn-jsx@5.0.1 requires a peer of acorn@^6.0.0 but none is installed.      You must install peer dependencies yourself.
                              
                              added 921 packages from 1366 contributors in 1049.638s
                              Errors while installing dependencies! (source command: npmc@latest install)
                              npm WARN grunt-stylelint@0.10.1 requires a peer of stylelint@^9.0.0 but none is      installed. You must install peer dependencies yourself.
                              
                              + acorn@6.0.5
                              added 2 packages from 78 contributors, updated 1 package and audited 2467 packag     es in 175.814s
                              found 8 vulnerabilities (7 low, 1 high)
                                run `npm audit fix` to fix them, or `npm audit` for details
                              Errors while installing dependencies! (source command: npm install acorn@latest)
                              + stylelint@9.9.0
                              added 155 packages from 107 contributors, removed 32 packages, updated 99 packages, moved 6 packages and audited 4452 packages in 458.975s
                              found 4 vulnerabilities (3 low, 1 high)
                                run `npm audit fix` to fix them, or `npm audit` for details
                              Errors while installing dependencies! (source command: pm install stylelint@latest)
                              + jshint@2.9.7
                              added 2 packages from 1 contributor, removed 6 packages and updated 5 packages in 226.509s
                              fixed 3 of 4 vulnerabilities in 4452 scanned packages
                                1 vulnerability required manual review and could not be updated
                              Vulnerabilities may remain!
                              Check plymouth installation ...
                              Splashscreen: Checking themes directory.
                              Splashscreen: Create theme directory if not exists.
                              Splashscreen: Theme copied successfully.
                              Splashscreen: Changed theme to MagicMirror successfully.
                              Do you want use pm2 for auto starting of your MagicMirror (y/N)?y
                              /usr/local/bin/pm2 -> /usr/local/lib/node_modules/pm2/bin/pm2
                              /usr/local/bin/pm2-dev -> /usr/local/lib/node_modules/pm2/bin/pm2-dev
                              /usr/local/bin/pm2-docker -> /usr/local/lib/node_modules/pm2/bin/pm2-docker
                              /usr/local/bin/pm2-runtime -> /usr/local/lib/node_modules/pm2/bin/pm2-runtime
                              npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/pm2/node_modules/fsevents):
                              npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
                              
                              + pm2@3.2.4
                              added 313 packages from 246 contributors in 320.301s
                              
                                                      -------------
                              
                              __/\\\\\\\\\\\\\____/\\\\____________/\\\\____/\\\\\\\\\_____
                               _\/\\\/////////\\\_\/\\\\\\________/\\\\\\__/\\\///////\\\___
                                _\/\\\_______\/\\\_\/\\\//\\\____/\\\//\\\_\///______\//\\\__
                                 _\/\\\\\\\\\\\\\/__\/\\\\///\\\/\\\/_\/\\\___________/\\\/___
                                  _\/\\\/////////____\/\\\__\///\\\/___\/\\\________/\\\//_____
                                   _\/\\\_____________\/\\\____\///_____\/\\\_____/\\\//________
                                    _\/\\\_____________\/\\\_____________\/\\\___/\\\/___________
                                     _\/\\\_____________\/\\\_____________\/\\\__/\\\\\\\\\\\\\\\_
                                      _\///______________\///______________\///__\///////////////__
                              
                              
                                                        Runtime Edition
                              
                                      PM2 is a Production Process Manager for Node.js applications
                                                   with a built-in Load Balancer.
                              
                                              Start and Daemonize any application:
                                              $ pm2 start app.js
                              
                                              Load Balance 4 instances of api.js:
                                              $ pm2 start api.js -i 4
                              
                                              Monitor in production:
                                              $ pm2 monitor
                              
                                              Make pm2 auto-boot at server restart:
                                              $ pm2 startup
                              
                                              To go further checkout:
                                              http://pm2.io/
                              
                              
                                                      -------------
                              
                              [PM2] Init System found: systemd
                              Platform systemd
                              Template
                              [Unit]
                              Description=PM2 process manager
                              Documentation=https://pm2.keymetrics.io/
                              After=network.target
                              
                              [Service]
                              Type=forking
                              User=pi
                              LimitNOFILE=infinity
                              LimitNPROC=infinity
                              LimitCORE=infinity
                              Environment=PATH=/usr/local/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
                              Environment=PM2_HOME=/home/pi/.pm2
                              PIDFile=/home/pi/.pm2/pm2.pid
                              
                              ExecStart=/usr/local/lib/node_modules/pm2/bin/pm2 resurrect
                              ExecReload=/usr/local/lib/node_modules/pm2/bin/pm2 reload all
                              ExecStop=/usr/local/lib/node_modules/pm2/bin/pm2 kill
                              
                              [Install]
                              WantedBy=multi-user.target
                              
                              Target path
                              /etc/systemd/system/pm2-pi.service
                              Command list
                              [ 'systemctl enable pm2-pi' ]
                              [PM2] Writing init configuration in /etc/systemd/system/pm2-pi.service
                              [PM2] Making script booting at startup...
                              [PM2] [-] Executing: systemctl enable pm2-pi...
                              Created symlink /etc/systemd/system/multi-user.target.wants/pm2-pi.service → /etc/systemd/system/pm2-pi.service.
                              [PM2] [v] Command successfully executed.
                              +---------------------------------------+
                              [PM2] Freeze a process list on reboot via:
                              $ pm2 save
                              
                              [PM2] Remove init script via:
                              $ pm2 unstartup systemd
                              
                                                      -------------
                              
                              __/\\\\\\\\\\\\\____/\\\\____________/\\\\____/\\\\\\\\\_____
                               _\/\\\/////////\\\_\/\\\\\\________/\\\\\\__/\\\///////\\\___
                                _\/\\\_______\/\\\_\/\\\//\\\____/\\\//\\\_\///______\//\\\__
                                 _\/\\\\\\\\\\\\\/__\/\\\\///\\\/\\\/_\/\\\___________/\\\/___
                                  _\/\\\/////////____\/\\\__\///\\\/___\/\\\________/\\\//_____
                                   _\/\\\_____________\/\\\____\///_____\/\\\_____/\\\//________
                                    _\/\\\_____________\/\\\_____________\/\\\___/\\\/___________
                                     _\/\\\_____________\/\\\_____________\/\\\__/\\\\\\\\\\\\\\\_
                                      _\///______________\///______________\///__\///////////////__
                              
                              
                                                        Runtime Edition
                              
                                      PM2 is a Production Process Manager for Node.js applications
                                                   with a built-in Load Balancer.
                              
                                              Start and Daemonize any application:
                                              $ pm2 start app.js
                              
                                              Load Balance 4 instances of api.js:
                                              $ pm2 start api.js -i 4
                              
                                              Monitor in production:
                                              $ pm2 monitor
                              
                                              Make pm2 auto-boot at server restart:
                                              $ pm2 startup
                              
                                              To go further checkout:
                                              http://pm2.io/
                              
                              
                                                      -------------
                              
                              [PM2] Spawning PM2 daemon with pm2_home=/home/pi/.pm2
                              [PM2] PM2 Successfully daemonized
                              [PM2][WARN] Applications MagicMirror not running, starting...
                              [PM2] App [MagicMirror] launched (1 instances)
                              ┌─────────────┬────┬───────┬────────┬────────┬─────┬────────┬──────────┐
                              │ Name        │ id │ mode  │ status │ ↺      │ cpu │ memory │
                              ├─────────────┼────┼───────┼────────┼────────┼─────┼────────┼──────────┤
                              │ MagicMirror │ 0  │ 2.6.0 │ fork   │ online │ 0   │ 0%     │ 2.5 MB   │
                              └─────────────┴────┴───────┴────────┴────────┴─────┴────────┴──────────┘
                               Use `pm2 show ` to get more details about an app
                              [PM2] Saving current process list...
                              [PM2] Successfully saved in /home/pi/.pm2/dump.pm2
                              
                              We're ready! Restart your Pi Zero to start your MagicMirror.
                              
                              
                              pi@raspberrypi:~ $ sudo login as: pi
                              individual files in /usr/share/doc/*/copyright.
                              
                              Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
                              permitted by applicable law.
                              Last login: Mon Jan  7 20:33:42 2019
                              pi@raspberrypi:~ $ bash -c "$(curl -sL https://raw.githubusercontent.com/ac2799/     MagicMirror/master/installers/raspberry.sh)"
                              
                              $$\      $$\                     $$\           $$\      $$\ $$\                                               $$$$$$\
                              $$$\    $$$ |                    \__|          $$$\    $$$ |\__|                                             $$  __$$\
                              $$$$\  $$$$ | $$$$$$\   $$$$$$\  $$\  $$$$$$$\ $$$$\  $$$$ |$$\  $$$$$$\   $$$$$     $\   $$$$$$\   $$$$$$\  \__/  $$ |
                              $$\$$\$$ $$ | \____$$\ $$  __$$\ $$ |$$  _____|$$\$$\$$ $$ |$$ |$$  __$$\ $$  __     $$\ $$  __$$\ $$  __$$\  $$$$$$  |
                              $$ \$$$  $$ | $$$$$$$ |$$ /  $$ |$$ |$$ /      $$ \$$$  $$ |$$ |$$ |  \__|$$ |       \__|$$ /  $$ |$$ |  \__|$$  ____/
                              $$ |\$  /$$ |$$  __$$ |$$ |  $$ |$$ |$$ |      $$ |\$  /$$ |$$ |$$ |      $$ |           $$ |  $$ |$$ |      $$ |
                              $$ | \_/ $$ |\$$$$$$$ |\$$$$$$$ |$$ |\$$$$$$$\ $$ | \_/ $$ |$$ |$$ |      $$ |           \$$$$$$  |$$ |      $$$$$$$$\
                              \__|     \__| \_______| \____$$ |\__| \_______|\__|     \__|\__|\__|      \__|            \______/ \__|      \________|
                                                     $$\   $$ |
                                                     \$$$$$$  |
                                                      \______/
                              
                              If you are running a Pi Zero, installation will continue, but you will have to r     un in server only mode.
                              Updating packages ...
                              Stary:1 http://archive.raspberrypi.org/debian stretch InRelease
                              Stary:2 http://raspbian.raspberrypi.org/raspbian stretch InRelease
                              Czytanie list pakietów... Gotowe
                              Czytanie list pakietów... Gotowe
                              Budowanie drzewa zależności
                              Odczyt informacji o stanie... Gotowe
                              Obliczanie aktualizacji... Gotowe
                              0 aktualizowanych, 0 nowo instalowanych, 0 usuwanych i 0 nieaktualizowanych.
                              E: Nie udało się otworzyć pliku blokady /var/lib/dpkg/lock - open (13: Brak dost     ępu)
                              E: Nie udało się zablokować katalogu administracyjnego (/var/lib/dpkg/), czy uży     to uprawnień administratora?
                              Update failed, carrying on installation ...
                              Installing helper tools ...
                              Czytanie list pakietów... Gotowe
                              Budowanie drzewa zależności
                              Odczyt informacji o stanie... Gotowe
                              build-essential is already the newest version (12.3).
                              curl is already the newest version (7.52.1-5+deb9u8).
                              git is already the newest version (1:2.11.0-3+deb9u4).
                              unzip is already the newest version (6.0-21).
                              wget is already the newest version (1.18-5+deb9u2).
                              0 aktualizowanych, 0 nowo instalowanych, 0 usuwanych i 0 nieaktualizowanych.
                              Check current Node installation ...
                              Node.js is not installed.
                              Installing Node.js ...
                              Downloading node v11.6.0
                                % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                                               Dload  Upload   Total   Spent    Left  Speed
                              100 17.0M  100 17.0M    0     0   861k      0  0:00:20  0:00:20 --:--:--  968k
                              Extracting node v11.6.0
                              Extracting node and npm
                              Czytanie list pakietów... Gotowe
                              Budowanie drzewa zależności
                              Odczyt informacji o stanie... Gotowe
                              git is already the newest version (1:2.11.0-3+deb9u4).
                              0 aktualizowanych, 0 nowo instalowanych, 0 usuwanych i 0 nieaktualizowanych.
                              Czytanie list pakietów... Gotowe
                              Budowanie drzewa zależności
                              Odczyt informacji o stanie... Gotowe
                              Zostaną zainstalowane następujące NOWE pakiety:
                                unclutter
                              0 aktualizowanych, 1 nowo instalowanych, 0 usuwanych i 0 nieaktualizowanych.
                              Konieczne pobranie 16,6 kB archiwów.
                              Po tej operacji zostanie dodatkowo użyte 47,1 kB miejsca na dysku.
                              Pobieranie:1 http://ftp.icm.edu.pl/pub/Linux/distributions/raspbian/raspbian str     etch/main armhf unclutter armhf 8-20 [16,6 kB]
                              Pobrano 16,6 kB w 1s (14,1 kB/s)
                              Prekonfiguracja pakietów ...
                              Wybieranie wcześniej niewybranego pakietu unclutter.
                              (Odczytywanie bazy danych ... 80763 pliki i katalogi obecnie zainstalowane.)
                              Przygotowywanie do rozpakowania pakietu .../unclutter_8-20_armhf.deb ...
                              Rozpakowywanie pakietu unclutter (8-20) ...
                              Konfigurowanie pakietu unclutter (8-20) ...
                              Przetwarzanie wyzwalaczy pakietu man-db (2.7.6.1-2)...
                              Cloning MagicMirror ...
                              Cloning into 'MagicMirror'...
                              remote: Enumerating objects: 305, done.
                              remote: Counting objects: 100% (305/305), done.
                              remote: Compressing objects: 100% (273/273), done.
                              remote: Total 305 (delta 37), reused 169 (delta 22), pack-reused 0
                              Receiving objects: 100% (305/305), 614.71 KiB | 747.00 KiB/s, done.
                              Resolving deltas: 100% (37/37), done.
                              Cloning MagicMirror Done!
                              Installing dependencies ...
                              npx: zainstalowano 405 w 218.392s
                              npm notice CANARY npmc is experimental software. If you find an issue, please fi     le it in the main npm repository, and call out that you were using npmc.
                              npm WARN deprecated time-grunt@2.0.0: Deprecated because Grunt is practically un     maintained. Move on to something better. This package will continue to work with      Grunt v1, but it will not receive any updates.
                              npm WARN deprecated nomnom@1.8.1: Package no longer supported. Contact support@n     pmjs.com for more info.
                              
                              > electron-chromedriver@1.8.0 install /home/pi/MagicMirror/node_modules/electron     -chromedriver
                              > node ./download-chromedriver.js
                              
                              successfully dowloaded and extracted!
                              
                              > electron@2.0.16 postinstall /home/pi/MagicMirror/node_modules/electron
                              > node install.js
                              
                              Downloading SHASUMS256.txt
                              [============================================>] 100.0% of 5.39 kB (5.39 kB/s)
                              
                              > magicmirror@2.6.0 install /home/pi/MagicMirror
                              > cd vendor && npm install
                              
                              npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fse     vents):
                              npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@     1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"}     )
                              
                              added 82 packages from 57 contributors and audited 220 packages in 118.631s
                              found 3 low severity vulnerabilities
                                run `npm audit fix` to fix them, or `npm audit` for details
                              
                              > magicmirror@2.6.0 postinstall /home/pi/MagicMirror
                              > sh installers/postinstall/postinstall.sh && npm run install-fonts
                              
                              MagicMirror installation successful!
                              
                              > magicmirror@2.6.0 install-fonts /home/pi/MagicMirror
                              > cd fonts && npm install
                              
                              added 1 package from 1 contributor and audited 1 package in 42.42s
                              found 0 vulnerabilities
                              
                              npm WARN grunt-stylelint@0.10.1 requires a peer of stylelint@^9.0.0 but none is      installed. You must install peer dependencies yourself.
                              npm WARN acorn-jsx@5.0.1 requires a peer of acorn@^6.0.0 but none is installed.      You must install peer dependencies yourself.
                              
                              added 921 packages from 1366 contributors in 1049.638s
                              Errors while installing dependencies! (source command: npmc@latest install)
                              npm WARN grunt-stylelint@0.10.1 requires a peer of stylelint@^9.0.0 but none is      installed. You must install peer dependencies yourself.
                              
                              + acorn@6.0.5
                              added 2 packages from 78 contributors, updated 1 package and audited 2467 packag     es in 175.814s
                              found 8 vulnerabilities (7 low, 1 high)
                                run `npm audit fix` to fix them, or `npm audit` for details
                              Errors while installing dependencies! (source command: npm install acorn@latest)
                              + stylelint@9.9.0
                              added 155 packages from 107 contributors, removed 32 packages, updated 99 packages, moved 6 packages and audited 4452 packages in 458.975s
                              found 4 vulnerabilities (3 low, 1 high)
                                run `npm audit fix` to fix them, or `npm audit` for details
                              Errors while installing dependencies! (source command: pm install stylelint@latest)
                              + jshint@2.9.7
                              added 2 packages from 1 contributor, removed 6 packages and updated 5 packages in 226.509s
                              fixed 3 of 4 vulnerabilities in 4452 scanned packages
                                1 vulnerability required manual review and could not be updated
                              Vulnerabilities may remain!
                              Check plymouth installation ...
                              Splashscreen: Checking themes directory.
                              Splashscreen: Create theme directory if not exists.
                              Splashscreen: Theme copied successfully.
                              Splashscreen: Changed theme to MagicMirror successfully.
                              Do you want usHasło:
                              
                              Nieprawidłowe logowanie
                              raspberrypi login: rror (y/N)?y
                              /usr/local/bin/pm2 -> /usr/local/lib/node_modules/pm2/bin/pm2
                              /usr/local/bin/pm2-dev -> /usr/local/lib/node_modules/pm2/bin/pm2-dev
                              /usr/local/bin/pm2-docker -> /usr/local/lib/node_modules/pm2/bin/pm2-docker
                              /usr/local/bin/pm2-runtime -> /usr/local/lib/node_modules/pm2/bin/pm2-runtime
                              npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/pm2/node_modules/fsevents):
                              npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
                              
                              + pm2@3.2.4
                              added 313 packages from 246 contributors in 320.301s
                              
                                                      -------------
                              
                              __/\\\\\\\\\\\\\____/\\\\____________/\\\\____/\\\\\\\\\_____
                               _\/\\\/////////\\\_\/\\\\\\________/\\\\\\__/\\\///////\\\___
                                _\/\\\_______\/\\\_\/\\\//\\\____/\\\//\\\_\///______\//\\\__
                                 _\/\\\\\\\\\\\\\/__\/\\\\///\\\/\\\/_\/\\\___________/\\\/___
                                  _\/\\\/////////____\/\\\__\///\\\/___\/\\\________/\\\//_____
                                   _\/\\\_____________\/\\\____\///_____\/\\\_____/\\\//________
                                    _\/\\\_____________\/\\\_____________\/\\\___/\\\/___________
                                     _\/\\\_____________\/\\\_____________\/\\\__/\\\\\\\\\\\\\\\_
                                      _\///______________\///______________\///__\///////////////__
                              
                              
                                                        Runtime Edition
                              
                                      PM2 is a Production Process Manager for Node.js applications
                                                   with a built-in Load Balancer.
                              
                                              Start and Daemonize any application:
                                              $ pm2 start app.js
                              
                                              Load Balance 4 instances of api.js:
                                              $ pm2 start api.js -i 4
                              
                                              Monitor in production:
                                              $ pm2 monitor
                              
                                              Make pm2 auto-boot at server restart:
                                              $ pm2 startup
                              
                                              To go further checkout:
                                              http://pm2.io/
                              
                              
                                                      -------------
                              
                              [PM2] Init System found: systemd
                              Platform systemd
                              Template
                              [Unit]
                              Description=PM2 process manager
                              Documentation=https://pm2.keymetrics.io/
                              After=network.target
                              
                              [Service]
                              Type=forking
                              User=pi
                              LimitNOFILE=infinity
                              LimitNPROC=infinity
                              LimitCORE=infinity
                              Environment=PATH=/usr/local/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
                              Environment=PM2_HOME=/home/pi/.pm2
                              PIDFile=/home/pi/.pm2/pm2.pid
                              
                              ExecStart=/usr/local/lib/node_modules/pm2/bin/pm2 resurrect
                              ExecReload=/usr/local/lib/node_modules/pm2/bin/pm2 reload all
                              ExecStop=/usr/local/lib/node_modules/pm2/bin/pm2 kill
                              
                              [Install]
                              WantedBy=multi-user.target
                              
                              Target path
                              /etc/systemd/system/pm2-pi.service
                              Command list
                              [ 'systemctl enable pm2-pi' ]
                              [PM2] Writing init configuration in /etc/systemd/system/pm2-pi.service
                              [PM2] Making script booting at startup...
                              [PM2] [-] Executing: systemctl enable pm2-pi...
                              Created symlink /etc/systemd/system/multi-user.target.wants/pm2-pi.service → /etc/systemd/system/pm2-pi.service.
                              [PM2] [v] Command successfully executed.
                              +---------------------------------------+
                              [PM2] Freeze a process list on reboot via:
                              $ pm2 save
                              
                              [PM2] Remove init script via:
                              $ pm2 unstartup systemd
                              
                                                      -------------
                              
                              __/\\\\\\\\\\\\\____/\\\\____________/\\\\____/\\\\\\\\\_____
                               _\/\\\/////////\\\_\/\\\\\\________/\\\\\\__/\\\///////\\\___
                                _\/\\\_______\/\\\_\/\\\//\\\____/\\\//\\\_\///______\//\\\__
                                 _\/\\\\\\\\\\\\\/__\/\\\\///\\\/\\\/_\/\\\___________/\\\/___
                                  _\/\\\/////////____\/\\\__\///\\\/___\/\\\________/\\\//_____
                                   _\/\\\_____________\/\\\____\///_____\/\\\_____/\\\//________
                                    _\/\\\_____________\/\\\_____________\/\\\___/\\\/___________
                                     _\/\\\_____________\/\\\_____________\/\\\__/\\\\\\\\\\\\\\\_
                                      _\///______________\///______________\///__\///////////////__
                              
                              
                                                        Runtime Edition
                              
                                      PM2 is a Production Process Manager for Node.js applications
                                                   with a built-in Load Balancer.
                              
                                              Start and Daemonize any application:
                                              $ pm2 start app.js
                              
                                              Load Balance 4 instances of api.js:
                                              $ pm2 start api.js -i 4
                              
                                              Monitor in production:
                                           Hasło:
                              

                              after reboot server work properly. If I connect from my computer webbrowser everythings is fine.
                              On local LCD raspberry load to desktop and do not run chromium (default browser)

                              sorry for 2 post one by one.

                              1 Reply Last reply Reply Quote 0
                              • B Offline
                                Big11 @andyc7687
                                last edited by

                                @andyc7687

                                i run just

                                bash -c “$(curl -sL https://raw.githubusercontent.com/ac2799/MagicMirror/master/installers/raspberry.sh)”

                                don’t know if this leads to bare or Pi0 …

                                This is your “modified” installer script also for the Pi0…

                                A 1 Reply Last reply Reply Quote 0
                                • A Offline
                                  andyc7687 @Big11
                                  last edited by

                                  @big11 this goes to my forked repo. Are you booting through to the desktop or to the console?

                                  B 1 Reply Last reply Reply Quote 0
                                  • B Offline
                                    Big11 @andyc7687
                                    last edited by

                                    @andyc7687

                                    so since yesterday i installed many times from Scratch but without success……

                                    With your script i ran into Troubles with a lot of Errors…

                                    missing dependencies….

                                    so i suggest to do more steps after “sudo apt INSTALL --fix-missing” -> “apt UPGRADE --fix-missing” does not work…

                                    sudo dpkg –configure -a. and.
                                    sudo apt install -f.
                                    

                                    at npm install a lot of Warnings e.g.

                                    npm WARN grunt-stylelint@0.10.1 requires a peer of stylelint@^9.0.0 but none is installed. You must install peer dependencies yourself.
                                    npm WARN acorn-jsx@5.0.1 requires a peer of acorn@^6.0.0 but none is installed. You must install peer dependencies yourself.
                                    
                                    added 921 packages from 1366 contributors and audited 2466 packages in 859.404s
                                    found 8 vulnerabilities (7 low, 1 high)
                                      run `npm audit fix` to fix them, or `npm audit` for details
                                    Errors while installing dependencies! (source command: npmc@latest install)
                                    
                                    + stylelint@9.9.0
                                    added 156 packages from 107 contributors, removed 32 packages, updated 99 packages, moved 6 packages and audited 4452 packages in 370.707s
                                    found 4 vulnerabilities (3 low, 1 high)
                                      run `npm audit fix` to fix them, or `npm audit` for details
                                    Errors while installing dependencies! (source command: pm install stylelint@latest)
                                    
                                    pi@magicpi:~ $   run `npm audit fix` to fix them, or `npm audit` for details
                                    npm ERR! code EAUDITNOPJSON
                                    npm ERR! audit No package.json found: Cannot audit a project without a package.json
                                    
                                    npm ERR! A complete log of this run can be found in:
                                    npm ERR!     /home/pi/.npm/_logs/2019-01-09T07_05_26_138Z-debug.log
                                    npm ERR! code EAUDITNOPJSON
                                    npm ERR! audit No package.json found: Cannot audit a project without a package.json
                                    
                                    npm ERR! A complete log of this run can be found in:
                                    npm ERR!     /home/pi/.npm/_logs/2019-01-09T07_05_35_497Z-debug.log
                                    -bash: run: Kommando nicht gefunden.
                                    pi@magicpi:~ $ Errors while installing dependencies! (source command: pm install stylelint@latest)
                                    -bash: Syntaxfehler beim unerwarteten Wort `('
                                    

                                    i could fix this with

                                    "npm audit fix" or "npm audit fix --force" in directory MagicMirror
                                    

                                    and then i figured out autostart with PM2 as described in MM-Wiki but…

                                    it won’t start …

                                    as done in the guide i created a mm.sh script und configured this for autostart with pm2

                                    at next start Nothing happens to start MagicMirror localy

                                    a “pm2 logs mm”

                                    Shows a loop of “sh run-start.sh”

                                    |mm       | > magicmirror@2.6.0 start /home/pi/MagicMirror
                                    0|mm       | > sh run-start.sh
                                    0|mm       |
                                    0|mm       |
                                    0|mm       | > magicmirror@2.6.0 start /home/pi/MagicMirror
                                    0|mm       | > sh run-start.sh
                                    0|mm       |
                                    0|mm       |
                                    0|mm       | > magicmirror@2.6.0 start /home/pi/MagicMirror
                                    0|mm       | > sh run-start.sh
                                    0|mm       |
                                    0|mm       |
                                    0|mm       | > magicmirror@2.6.0 start /home/pi/MagicMirror
                                    0|mm       | > sh run-start.sh
                                    

                                    a cat to run-start.sh Shows

                                    pi@magicpi:~/MagicMirror $ cat run-start.sh
                                    if [ -z "$DISPLAY" ]; then #If not set DISPLAY is SSH remote or tty
                                            export DISPLAY=:0 # Set by default display
                                    fi
                                    electron js/electron.js $1
                                    

                                    !!!
                                    but electron.js isn’t installed

                                    trying manually install this with

                                    sudo npm install electron -g
                                    

                                    ended again in Error-Messages

                                    Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/electron/.electron'
                                    npm ERR! code ELIFECYCLE
                                    npm ERR! errno 1
                                    npm ERR! electron@4.0.1 postinstall: `node install.js`
                                    npm ERR! Exit status 1
                                    npm ERR!
                                    npm ERR! Failed at the electron@4.0.1 postinstall script.
                                    npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
                                    
                                    npm ERR! A complete log of this run can be found in:
                                    npm ERR!     /root/.npm/_logs/2019-01-09T09_13_51_893Z-debug.log
                                    

                                    so… now i’m giving up for These days….

                                    does anybody know where my Failure is ??

                                    Thank you

                                    A 1 Reply Last reply Reply Quote 0
                                    • A Offline
                                      andyc7687 @Big11
                                      last edited by andyc7687

                                      @big11 I did a test install today, so I’m really not sure what you are doing.

                                      You will notice that the missing dependencies are installed in subsequent steps (e.g. there’s a problem with style lint and acorn. This is then fixed (see where it says + stylelint@9.9.0 and + acorn lower down in your warnings).

                                      This installation is completely different from the MM-Wiki. It does not use sh run-start.sh at all. Therefore there may well be problems.

                                      Can I ask, are you doing your installation over SSH/Telnet? or on the Pi itself? because you keep mentioning ‘locally’ and I just want to make sure I know what you mean by that.

                                      Edit: Also, don’t use npm install in sudo; it should be run as the normal user

                                      B 1 Reply Last reply Reply Quote 0
                                      • B Offline
                                        Big11 @andyc7687
                                        last edited by

                                        @andyc7687

                                        as for your Question

                                        i’m installing over SSH but start it then directly on the Pi0…

                                        i will i try a new Installation by now…

                                        normally i don’t run “npm install” as root…
                                        don’t know if i wrote so…

                                        B 1 Reply Last reply Reply Quote 0
                                        • B Offline
                                          Big11 @Big11
                                          last edited by

                                          @big11

                                          thats my “achievment” from last night…

                                          pi@raspberrypi:~ $ cd MagicMirror/
                                          pi@raspberrypi:~/MagicMirror $ npm start
                                          
                                          > magicmirror@2.6.0 start /home/pi/MagicMirror
                                          > sh run-start.sh
                                          
                                          run-start.sh: 4: run-start.sh: electron: not found
                                          npm ERR! file sh
                                          npm ERR! code ELIFECYCLE
                                          npm ERR! errno ENOENT
                                          npm ERR! syscall spawn
                                          npm ERR! magicmirror@2.6.0 start: `sh run-start.sh`
                                          npm ERR! spawn ENOENT
                                          npm ERR!
                                          npm ERR! Failed at the magicmirror@2.6.0 start script.
                                          npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
                                          
                                          npm ERR! A complete log of this run can be found in:
                                          npm ERR!     /home/pi/.npm/_logs/2019-01-10T07_11_11_053Z-debug.log
                                          pi@raspberrypi:~/MagicMirror $
                                          
                                          
                                          
                                          1 Reply Last reply Reply Quote 0
                                          • 1 Offline
                                            12wsx
                                            last edited by

                                            finally full success!!:)
                                            @big11 install directly from raspberry terminal not via ssh.
                                            After few fresh installation and hundreds errors last time tried install using

                                            bash -c "$(curl -sL https://raw.githubusercontent.com/ac2799/MagicMirror/master/installers/raspberry.sh)"
                                            

                                            from raspberrypi terminal.There were some errors but finally worked.
                                            if you want, I can make a image of my card and share it.

                                            B 1 Reply Last reply Reply Quote 0

                                            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                            With your input, this post could be even better 💗

                                            Register Login
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 8
                                            • 9
                                            • 2 / 9
                                            • First post
                                              Last post
                                            Enjoying MagicMirror? Please consider a donation!
                                            MagicMirror created by Michael Teeuw.
                                            Forum managed by Sam, technical setup by Karsten.
                                            This forum is using NodeBB as its core | Contributors
                                            Contact | Privacy Policy