Navigation

    MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    Can't install MM on brand new Pi4

    Troubleshooting
    2
    9
    58
    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.
    • D
      Diminished7th last edited by Diminished7th

      Hi all, brand new to MM and fairly new to Pi here. I tried a manual install of MM as well as the auto installer from @sdetweil and both failed. I completely reformatted my brand new SD card and did a fresh install of Raspbian and tried the auto installer again, and am getting the same errors.

      I’ve noticed a few errors during the install process that may help troubleshoot, but I’m not sure how to fix them. Any help would be very much appreciated!

      During the install dependencies:

      Error: Generated checksum for "electron-v6.1.12-linux-armv7l.zip" did not match expected checksum.
          at Hash.hasher.on (/home/pi/MagicMirror/node_modules/sumchecker/index.js:151:20)
          at Hash.emit (events.js:198:13)
          at emitReadable_ (_stream_readable.js:555:12)
          at process._tickCallback (internal/process/next_tick.js:63:19)
      npm notice created a lockfile as package-lock.json. You should commit this file.
      npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@~2.1.1 (node_modules/chokidar/node_modules/fsevents):
      npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
      npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electron@6.1.12 (node_modules/electron):
      npm WARN optional SKIPPING OPTIONAL DEPENDENCY: electron@6.1.12 postinstall: `node install.js`
      npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
      

      Then once I get the “We’re ready! Run pm2 start MagicMirror[…]” message and it shows “status” as online, but then nothing happens. If I try “npm start” from the MM directory, I get this error:

      > magicmirror@2.12.0 start /home/pi/MagicMirror
      > DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js
      
      sh: 1: ./node_modules/.bin/electron: not found
      npm ERR! code ELIFECYCLE
      npm ERR! syscall spawn
      npm ERR! file sh
      npm ERR! errno ENOENT
      npm ERR! magicmirror@2.12.0 start: `DISPLAY="${DISPLAY:=:0}" ./node_modules/.bin/electron js/electron.js`
      npm ERR! spawn ENOENT
      npm ERR! 
      npm ERR! Failed at the magicmirror@2.12.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/2020-07-16T09_15_05_903Z-debug.log
      
      S 1 Reply Last reply Reply Quote 0
      • S
        sdetweil @Diminished7th last edited by

        @Diminished7th can u show me more of the log (~/install.log) above the checksum error…

        only time I have seen this is a network error…

        D 2 Replies Last reply Reply Quote 0
        • D
          Diminished7th @sdetweil last edited by Diminished7th

          @sdetweil thanks for your reply! Sure, here you go (from the log):

          install starting  - Thu Jul 16 10:35:02 CDT 2020
          installing on armv7l processor system
          the os is Distributor ID: Raspbian Description: Raspbian GNU/Linux 10 (buster) Release: 10 Codename: buster
          Updating packages ...
          Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease Hit:2 http://archive.raspberrypi.org/debian buster InRelease Reading package lists...
          apt-get update  completed ok
          apt-get upgrade  started
          apt upgrade result =rc=0 Reading package lists...
          Building dependency tree...
          Reading state information...
          Calculating upgrade...
          The following package was automatically installed and is no longer required:
            rpi-eeprom-images
          Use 'sudo apt autoremove' to remove it.
          0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
          Installing helper tools ...
          Reading package lists...
          Building dependency tree...
          Reading state information...
          build-essential is already the newest version (12.6).
          curl is already the newest version (7.64.0-4+deb10u1).
          git is already the newest version (1:2.20.1-2+deb10u3).
          unzip is already the newest version (6.0-23+deb10u1).
          wget is already the newest version (1.20.1-1.1).
          wget set to manually installed.
          The following package was automatically installed and is no longer required:
            rpi-eeprom-images
          Use 'sudo apt autoremove' to remove it.
          0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
          Check current Node installation ...
          Node currently installed. Checking version number.
          Minimum Node version: v10.1.0
          Installed Node version: v10.21.0
          No Node.js upgrade necessary.
          Check current NPM installation ...
          NPM currently installed. Checking version number.
          Minimum npm version: V6.0.0
          Installed npm version: V5.8.0
          npm should be upgraded.
          Installing npm ...
          Reading package lists...
          Building dependency tree...
          Reading state information...
          npm is already the newest version (5.8.0+ds6-4+deb10u1).
          npm set to manually installed.
          The following package was automatically installed and is no longer required:
            rpi-eeprom-images
          Use 'sudo apt autoremove' to remove it.
          0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
          upgrading npm to latest
          /usr/local/bin/npm -> /usr/local/lib/node_modules/npm/bin/npm-cli.js
          /usr/local/bin/npx -> /usr/local/lib/node_modules/npm/bin/npx-cli.js
          + npm@6.14.6
          added 435 packages from 877 contributors in 28.859s
          npm installation Done! version=V6.14.6
          Cloning MagicMirror ...
          Cloning MagicMirror Done!
          Installing dependencies ...
          Dependencies installation Done!
          setting up initial config.js
          Check plymouth installation ...
          Splashscreen: Checking themes directory.
          Splashscreen: Create theme directory if not exists.
          Splashscreen: Changed theme to MagicMirror successfully.
          install and setup pm2
          pm2 not installed, installing
          pm2 install result /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@~2.1.2 (node_modules/pm2/node_modules/chokidar/node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"}) + pm2@4.4.0 added 185 packages from 191 contributors in 28.8s
          get the pm2 platform specific startup command
          startup command = sudo env PATH=$PATH:/usr/bin:/bin /usr/local/lib/node_modules/pm2/bin/pm2 startup systemd -u pi --hp /home/pi
          
                                  -------------
          
          __/\\\\\\\\\\\\\____/\\\\____________/\\\\____/\\\\\\\\\_____
           _\/\\\/////////\\\_\/\\\\\\________/\\\\\\__/\\\///////\\\___
            _\/\\\_______\/\\\_\/\\\//\\\____/\\\//\\\_\///______\//\\\__
             _\/\\\\\\\\\\\\\/__\/\\\\///\\\/\\\/_\/\\\___________/\\\/___
              _\/\\\/////////____\/\\\__\///\\\/___\/\\\________/\\\//_____
               _\/\\\_____________\/\\\____\///_____\/\\\_____/\\\//________
                _\/\\\_____________\/\\\_____________\/\\\___/\\\/___________
                 _\/\\\_____________\/\\\_____________\/\\\__/\\\\\\\\\\\\\\\_
                  _\///______________\///______________\///__\///////////////__
          
          
                                    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=$PATH:/usr/bin:/bin:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
          Environment=PM2_HOME=/home/pi/.pm2
          PIDFile=/home/pi/.pm2/pm2.pid
          Restart=on-failure
          
          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...
          [PM2] [v] Command successfully executed.
          +---------------------------------------+
          [PM2] Freeze a process list on reboot via:
          $ pm2 save
          
          [PM2] Remove init script via:
          $ pm2 unstartup systemd
          pm2 startup command done
          configure the pm2 config file for MagicMirror
          start MagicMirror via pm2 now
          save MagicMirror pm2 config now
          stop MagicMirror via pm2 now
          disable screensaver via gsettings was true and uint32 300
          disable screensaver via lightdm.conf
          disable screensaver via lxsession
          We're ready! Run pm2 start MagicMirror from the ~/MagicMirror directory to start your MagicMirror.
          install completed - Thu Jul 16 10:39:17 CDT 2020
          
          1 Reply Last reply Reply Quote 0
          • D
            Diminished7th @sdetweil last edited by Diminished7th

            @sdetweil and this is from the terminal above the checksum error, after it finishes cloning MM:

            Installing dependencies ...
            npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
            npm WARN deprecated rrule-alt@2.2.8: Please use rrule instead
            npm WARN deprecated left-pad@1.3.0: use String.prototype.padStart()
            npm WARN deprecated webdriverio@4.14.4: outdated version, please use @next
            npm WARN deprecated core-js@2.6.11: core-js@3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
            npm WARN deprecated mkdirp@0.5.1: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
            npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
            npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
            /home/pi/MagicMirror/node_modules/electron/install.js:53
              throw err
              ^
            
            S 1 Reply Last reply Reply Quote 0
            • S
              sdetweil @Diminished7th last edited by

              @Diminished7th fun, try this

              cd ~/MagicMirror
              npm remove electron
              npm install electron@6.1.12
              
              D 1 Reply Last reply Reply Quote 0
              • D
                Diminished7th @sdetweil last edited by

                @sdetweil no joy. Still getting what appears to be the same error:

                pi@raspberrypi:~/MagicMirror $ npm install electron@6.1.12
                
                > electron@6.1.12 postinstall /home/pi/MagicMirror/node_modules/electron
                > node install.js
                
                Downloading tmp-18488-0-electron-v6.1.12-linux-armv7l.zip
                [============================================>] 100.0% of 54.85 MB (660.36 kB/s)
                /home/pi/MagicMirror/node_modules/electron/install.js:53
                  throw err
                  ^
                
                Error: Generated checksum for "electron-v6.1.12-linux-armv7l.zip" did not match expected checksum.
                    at Hash.hasher.on (/home/pi/MagicMirror/node_modules/sumchecker/index.js:151:20)
                    at Hash.emit (events.js:198:13)
                    at emitReadable_ (_stream_readable.js:555:12)
                    at process._tickCallback (internal/process/next_tick.js:63:19)
                npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fsevents):
                npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
                
                npm ERR! code ELIFECYCLE
                npm ERR! errno 1
                npm ERR! electron@6.1.12 postinstall: `node install.js`
                npm ERR! Exit status 1
                npm ERR! 
                npm ERR! Failed at the electron@6.1.12 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!     /home/pi/.npm/_logs/2020-07-16T16_06_11_241Z-debug.log
                

                It does look like when it’s trying to download the .zip file it’s getting hung up somewhere. I tried the install 5 or 6 times and each time the download progress will “pause” at a different point, sometimes around 13%, sometimes 20% or 30%, it’ll hang there and then jump to 100%. Not sure if this means something.

                Is there a way to download the file locally and install that way to ensure it’s being downloaded completely? Should I try a different version of electron?

                S 1 Reply Last reply Reply Quote 0
                • S
                  sdetweil @Diminished7th last edited by

                  @Diminished7th how is the pi connected to the internet?, wired, wifi?
                  have u rebooted your router

                  D 2 Replies Last reply Reply Quote 0
                  • D
                    Diminished7th @sdetweil last edited by

                    @sdetweil it’s on wifi. I rebooted the modem and router last night during troubleshooting. I can browse the internet while it’s downloading so the internet appears to be functioning properly. I can unhook everything and wire it up to the router if you think that will help?

                    1 Reply Last reply Reply Quote 0
                    • D
                      Diminished7th @sdetweil last edited by Diminished7th

                      @sdetweil your first response seems to have been correct! It appears it is some issue with the network. For some reason, it will begin to download the .zip file, but not complete it each time. It’s not that the network is going down because it doesn’t lose connection. Maybe something with the router’s firewall?

                      Anyways, I connected the Pi to my phone hotspot and ran the electron install, and it completed just fine and I am up and running.

                      If anyone else is having this issue, the telltale sign is the progress bar getting hung up before 100% and then quickly jumping to 100% and then immediately throwing the checksum error.

                      Thanks to @sdetweil for the troubleshooting tips! I will be marking as solved!!

                      EDIT: Guess I can’t mark as solved. I’ll just let the thread die. 🙂

                      1 Reply Last reply Reply Quote 1
                      • 1 / 1
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy