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.

    dpkg: error unpacking nodejs during MM2 manual installation

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    manual installationerror unpacking nodejs
    4 Posts 2 Posters 1.1k Views 2 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.
    • J Offline
      jackl6681
      last edited by

      During installation of MM2 and I am getting an error when trying to unpack nodejs in the first step of the manual installation…

      curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
      sudo apt install -y nodejs

      The error is:
      Preparing to unpack …/nodejs_16.13.2-deb-1nodesource1_armhf.deb …
      Unpacking nodejs (16.13.2-deb-1nodesource1) over (12.22.5~dfsg-2~11u1) …
      dpkg: error processing archive /var/cache/apt/archives/nodejs_16.13.2-deb-1nodesource1_armhf.deb (–unpack)
      :
      trying to overwrite ‘/usr/share/doc/nodejs/api/fs.html’, which is also in package nodejs-doc 12.22.5~dfsg-
      2~11u1
      dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
      Errors were encountered while processing:
      /var/cache/apt/archives/nodejs_16.13.2-deb-1nodesource1_armhf.deb
      E: Sub-process /usr/bin/dpkg returned an error code (1)

      I have started from scratch and reloaded RP OS 3X and get the same error at the same point each time.
      Using a Raspberry Pi 4 with 4 GB and a 64 GB microSD card.

      RP functions perfectly just cannot get past this error.

      Thanks advance for any assistance.

      S 1 Reply Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @jackl6681
        last edited by sdetweil

        @jackl6681 yes, bullseye is a mess…

        In my install script I use n to install the right version

        sudo npm install n -g
        

        then to install node 16(latest)

        n 16
        

        you can install a specific version

        n 16.1.0
        

        n is the nodejs version of nvm ( node version manager)

        I was unsuccessful at recovering the system after trying to install without n. and had to reflash.

        see
        https://github.com/sdetweil/MagicMirror_scripts

        n --help gives you more info

        you can switch between versions
        you can run one version for one app, and a different version for another app.

        all kinds of cool uses

        n does not work on windows

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        J 1 Reply Last reply Reply Quote 0
        • J Offline
          jackl6681 @sdetweil
          last edited by

          @sdetweil - ran your script with new flash , kicked out line 375

          pi@raspberrypi:~ $ bash -c “$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/raspberry.sh)”

          $$\ $$\ $$\ $$\ $$\ $$\ $$$$$$
          $$$\ $$$ | _| $$$\ $$$ |_| $$ $$
          $$$$\ $$$$ | $$$$$$\ $$$$$$\ $$\ $$$$$$$\ $$$$\ $$$$ |$$\ $$$$$$\ $$$$$$\ $$$$$$\ $$$$$$\ _/ $$ |
          $$$$$$ $$ | _
          $$\ $$ $$\ $$ |$$ |$$$$$$ $$ |$$ |$$ $$\ $$ $$\ $$ $$\ $$ $$\ $$$$$$ |
          $$ $$$ $$ | $$$$$$$ |$$ / $$ |$$ |$$ / $$ $$$ $$ |$$ |$$ | _|$$ | _|$$ / $$ |$$ | _|$$ /
          $$ |$ /$$ |$$ __$$ |$$ | $$ |$$ |$$ | $$ |$ /$$ |$$ |$$ | $$ | $$ | $$ |$$ | $$ |
          $$ | _/ $$ |$$$$$$$ |$$$$$$$ |$$ |$$$$$$$\ $$ | _/ $$ |$$ |$$ | $$ | $$$$$$ |$$ | $$$$$$$$
          _
          | _
          | _
          | _
          $$ |_| _
          |_| _|_|_| __| _
          / _| _______|
          $$\ $$ |
          $$$$$$ |
          _
          ____/

          install log being saved to /home/pi/install.log
          Installing helper tools …
          E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 1376 (packagekitd)
          E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
          Updating packages …
          bash: line 144: pv: command not found
          Check current Node installation …
          Node.js is not installed.
          Installing Node.js …
          E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 1376 (packagekitd)
          N: Be aware that removing the lock file is not a solution and may break your system.
          E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
          E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 1376 (packagekitd)
          N: Be aware that removing the lock file is not a solution and may break your system.
          E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
          E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 1376 (packagekitd)
          E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
          bash: line 262: node: command not found
          Node.js installation Done! version=
          Check current NPM installation …
          npm is not installed.
          Installing npm …
          E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 1376 (packagekitd)
          E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
          sudo: npm: command not found
          bash: line 310: npm: command not found
          npm installation Done! version=V
          Cloning MagicMirror …
          Cloning into ‘MagicMirror’…
          remote: Enumerating objects: 330, done.
          remote: Counting objects: 100% (330/330), done.
          remote: Compressing objects: 100% (289/289), done.
          remote: Total 330 (delta 51), reused 148 (delta 29), pack-reused 0
          Receiving objects: 100% (330/330), 448.62 KiB | 172.00 KiB/s, done.
          Resolving deltas: 100% (51/51), done.
          Cloning MagicMirror Done!
          Installing dependencies …
          bash: line 375: npm: command not found
          Unable to install dependencies!

          1 Reply Last reply Reply Quote 0
          • J Offline
            jackl6681
            last edited by

            Thanks much! sdetweil…

            was able to get MM2 up and running.

            Cheers from Toronto Ontario Canada

            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 / 1
            • 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