Read the statement by Michael Teeuw here.
Failed Update
-
@DarkV said in Failed Update:
/gpgkey/nodesource.gpg.key | gpg --dearmor
that is not in my repo currently
did you git clone the MagicMirror_scripts repo and are executing from the clone??
don’t do that… execute by copy/paste the lines on the github page
-
@DarkV has node 20.5.1
that is the bad version
sudo apt-get remove nodejs npm -y
rename the log file out of the way. we don’t need info from Oct 2 now
new log will be created
-
@sdetweil Processing triggers for man-db (2.9.4-2) …
junior@MAGIC-MIRROR:~ $ bash -c “$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)”doing test run = true, NO updates will be applied!
update log will be in /home/junior/MagicMirror/installers/upgrade.log
Check current Node installation …
Node currently installed. Checking version number.
bash: line 209: /usr/local/bin/node: No such file or directory
Minimum Node version: v20.8.0
Installed Node version: V1.0.0
Node should be upgraded.
/usr/bin/env: ‘node’: No such file or directory
junior@MAGIC-MIRROR:~ $ bash -c “$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)” applyapply: line 176: /usr/local/bin/node: No such file or directory
doing test run = false
update log will be in /home/junior/MagicMirror/installers/upgrade.log
Check current Node installation …
Node currently installed. Checking version number.
apply: line 209: /usr/local/bin/node: No such file or directory
Minimum Node version: v20.8.0
Installed Node version: V1.0.0
Node should be upgraded.
MagicMirror running under control of PM2, stopping
junior@MAGIC-MIRROR:~ $
junior@MAGIC-MIRROR:~ $ -
@DarkV show me the ~/MagicMirror/installers/upgrade.log
looks like this is a hybrid os… 64 bit kernel and 32 bit runtime… and the wrong architecture node was installed
so, again do this,
hash -r sudo apt-get remove nodejs npm -y hash -r node -v
should get not found
then dowhich node
show the results, nothing means not found
if there is a result do
node -v -
@sdetweil Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Package ‘npm’ is not installed, so not removed
The following packages were automatically installed and are no longer required:
libfuse2 raspinfo
Use ‘sudo apt autoremove’ to remove them.
The following packages will be REMOVED:
nodejs
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 183 MB disk space will be freed.
(Reading database … 108415 files and directories currently installed.)
Removing nodejs (20.5.1-deb-1nodesource1) …
dpkg: warning: while removing nodejs, directory ‘/usr/lib/node_modules’ not empty so not removed
Processing triggers for man-db (2.9.4-2) …
junior@MAGIC-MIRROR:~ $ hash -r
junior@MAGIC-MIRROR:~ $ node -v
-bash: /usr/local/bin/node: No such file or directory
junior@MAGIC-MIRROR:~ $ which node
/usr/local/bin/node
junior@MAGIC-MIRROR:~ $ node -v
-bash: /usr/local/bin/node: No such file or directory
junior@MAGIC-MIRROR:~ $ -
@DarkV oh such joy
sudo n ls sudo n prune sudo n uninstall hash -r which node ``
-
@sdetweil I am glad you know what all this means as I have no clue, many thanks for taking the time to help me, the wifey will kill me if this f***s up:beaming_face_with_smiling_eyes: .
login as: junior
junior@192.168.2.52’s password:
Linux MAGIC-MIRROR 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Oct 31 12:51:37 2023
junior@MAGIC-MIRROR:~ $ hash -r
junior@MAGIC-MIRROR:~ $ sudo apt-get remove nodejs npm -y
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
Package ‘npm’ is not installed, so not removed
The following packages were automatically installed and are no longer required:
libfuse2 raspinfo
Use ‘sudo apt autoremove’ to remove them.
The following packages will be REMOVED:
nodejs
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 183 MB disk space will be freed.
(Reading database … 108415 files and directories currently installed.)
Removing nodejs (20.5.1-deb-1nodesource1) …
dpkg: warning: while removing nodejs, directory ‘/usr/lib/node_modules’ not empty so not removed
Processing triggers for man-db (2.9.4-2) …
junior@MAGIC-MIRROR:~ $ hash -r
junior@MAGIC-MIRROR:~ $ node -v
-bash: /usr/local/bin/node: No such file or directory
junior@MAGIC-MIRROR:~ $ which node
/usr/local/bin/node
junior@MAGIC-MIRROR:~ $ node -v
-bash: /usr/local/bin/node: No such file or directory
junior@MAGIC-MIRROR:~ $ ^C
junior@MAGIC-MIRROR:~ $ sudo n ls
node/20.8.0
junior@MAGIC-MIRROR:~ $ sudo n prune
/usr/bin/n: line 474: /usr/local/bin/node: No such file or directory
node/20.8.0
junior@MAGIC-MIRROR:~ $ sudo n uninstall
Do you wish to delete node and npm from /usr/local? yUninstalling node and npm
/usr/local/bin/node
/usr/local/bin/npm
/usr/local/bin/npx
/usr/local/bin/corepack
/usr/local/include/node
/usr/local/lib/node_modules/npm
/usr/local/lib/node_modules/corepack
/usr/local/share/doc/node
/usr/local/share/man/man1/node.1
junior@MAGIC-MIRROR:~ $ hash -r
junior@MAGIC-MIRROR:~ $
which node
junior@MAGIC-MIRROR:~ $ which node
``
junior@MAGIC-MIRROR:~ $ -
@DarkV ok,
two more commands for info before running
lsb_release -a file /bin/bash
NOW try to run my upgrade script… note that it will NOT install node in test mode…
so you have to use the second link that adds the apply parm
-
@sdetweil said in Failed Update:
file /bin/bash
unior@MAGIC-MIRROR:~ $ bash -c “$(curl -sL https://raw.githubusercontent.com/sdetweil/MagicMirror_scripts/master/upgrade-script.sh)” apply
curl: (18) transfer closed with 23780100 bytes remaining to read
xz: (stdin): Unexpected end of input
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting nowError: failed to download archive for 20.8.0
doing test run = false
update log will be in /home/junior/MagicMirror/installers/upgrade.log
Check current Node installation …
Node currently installed. Checking version number.
Minimum Node version: v20.8.0
Installed Node version: v20.5.1
Node should be upgraded.
Installing Node.js …
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
nodejs is already the newest version (20.5.1-deb-1nodesource1).
The following packages were automatically installed and are no longer required:
libfuse2 raspinfo
Use ‘sudo apt autoremove’ to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
node version is
Node.js installation Done! version=v20.5.1
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. -
@DarkV man this is a pain
one more try
sudo apt-get remove nodejs npm -y hash -r which node which n
if which n response with empty then do
sudo apt-get install n
once n responds then
sudo n 20.8.0 --arch armv7l hash -r node -v
should say V20.8.0
i notice that I didn’t copy this little part from the install script…
please let me know