Thanks again. Got back to this.
One thing I should have said earlier: to get reliable downloading of node things I had to add
2606:4700::6810:1323 registry.npmjs.org
To /etc/hosts as the machine is sitting in an ipv6 network at my ISP and they advised me that this fixes some intermittent failures pulling things from npmjs.org site.
OK. To the meat of the matter: I think you have helped me a bit closer but I am still hitting a problem. Here's the detail.
I started by deleting the old installation directories (after fresh login to the machine but I suspect that's irrelevant). Ran apt-get update & apt-get upgrade: some packages upgraded. Launched R and ran update.packages(): nothing to update. I already have cmake at 3.19.1 so skipped remaking that. So today's sequence was:
git clone https://github.com/rstudio/shiny-server.git
cd shiny-server
DIR=`pwd`
PATH=$DIR/bin:$PATH
mkdir tmp
cd tmp
PYTHON=`which python`
sudo cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DPYTHON="$PYTHON" ../
sudo make
mkdir ../build
Which produced a cmake warning:
chris@raspberrypi:~/shiny-server/tmp$ sudo cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DPYTHON="$PYTHON" ../
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.
Update the VERSION argument <min> value or use a ...<max> suffix to tell
CMake that the project does not need compatibility with older versions.
But I am guessing that's not fatal, just a warning about something that will need changing in the script at some point soon as cmake continues to update. It also ends with a warning which may be more important:
-- gunzip /home/chris/shiny-server/tmp/external/pandoc/pandoc-citeproc.gz
-- Configuring done
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
PYTHON
-- Build files have been written to: /home/chris/shiny-server/tmp
However, again, to my inexpert eye, that is warning, not an error. My python at which python
, i.e. /usr/bin/python, is 2.7.16.
Then I insert your new sed lines, replacing the ones in the blog so:
sed -i '8s/.*/NODE_SHA256=976285886f734ac4e13be8b34586136499b088aa32c6430ca8eee166d167dca5/' ../external/node/install-node.sh # node-v12.20.0-linux-arm64.tar.xz
sed -i 's/linux-x64.tar.xz/linux-arm64.tar.xz/' ../external/node/install-node.sh
No messages: good!
Then I continued with:
sed -i 's/https:\/\/github.com\/jcheng5\/node-centos6\/releases\/download\//https:\/\/nodejs.org\/dist\//' ../external/node/install-node.sh
(cd .. && sudo ./external/node/install-node.sh)
Seems fine:
Downloading Node v12.20.0 from https://nodejs.org/dist/v12.20.0/node-v12.20.0-linux-arm64.tar.xz
--2021-04-03 14:25:12-- https://nodejs.org/dist/v12.20.0/node-v12.20.0-linux-arm64.tar.xz
Resolving nodejs.org (nodejs.org)... 2606:4700:10::6814:172e, 2606:4700:10::6814:162e, 104.20.22.46, ...
Connecting to nodejs.org (nodejs.org)|2606:4700:10::6814:172e|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14038888 (13M) [application/x-xz]
Saving to: ‘/tmp/node-v12.20.0-linux-arm64.tar.xz’
/tmp/node-v12.20.0-linux-arm64.tar.xz 100%[==========================================================================================================================================================================>] 13.39M 27.9MB/s in 0.5s
2021-04-03 14:25:13 (27.9 MB/s) - ‘/tmp/node-v12.20.0-linux-arm64.tar.xz’ saved [14038888/14038888]
Extracting node-v12.20.0-linux-arm64.tar.xz
Sadly, that fails:
Downloading Node v12.20.0 from https://nodejs.org/dist/v12.20.0/node-v12.20.0-linux-arm64.tar.xz
--2021-04-03 14:25:12-- https://nodejs.org/dist/v12.20.0/node-v12.20.0-linux-arm64.tar.xz
Resolving nodejs.org (nodejs.org)... 2606:4700:10::6814:172e, 2606:4700:10::6814:162e, 104.20.22.46, ...
Connecting to nodejs.org (nodejs.org)|2606:4700:10::6814:172e|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 14038888 (13M) [application/x-xz]
Saving to: ‘/tmp/node-v12.20.0-linux-arm64.tar.xz’
/tmp/node-v12.20.0-linux-arm64.tar.xz 100%[==========================================================================================================================================================================>] 13.39M 27.9MB/s in 0.5s
2021-04-03 14:25:13 (27.9 MB/s) - ‘/tmp/node-v12.20.0-linux-arm64.tar.xz’ saved [14038888/14038888]
Extracting node-v12.20.0-linux-arm64.tar.xz
chris@raspberrypi:~/shiny-server/tmp$ (cd .. && ./bin/npm --python="${PYTHON}" install --no-optional)
> shiny-server@1.5.17 install /home/chris/shiny-server
> node-gyp rebuild
gyp WARN install got an error, rolling back install
gyp ERR! configure error
gyp ERR! stack Error: connect ECONNREFUSED 104.20.22.46:443
gyp ERR! stack at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1144:16)
gyp ERR! System Linux 5.10.17-v8+
gyp ERR! command "/home/chris/shiny-server/ext/node/bin/node" "/home/chris/shiny-server/ext/node/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/chris/shiny-server
gyp ERR! node -v v12.20.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! shiny-server@1.5.17 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the shiny-server@1.5.17 install 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/chris/.npm/_logs/2021-04-03T14_26_32_871Z-debug.log
That's replicable (three tries, starting over from having deleted the directories each time). If I go to that log file it doesn't throw much more light on things for me but it may for you. Here are the last lines:
62 verbose unlock done using /home/chris/.npm/_locks/staging-43571a4f0bb3a8f4.lock for /home/chris/shiny-server/node_modules/.staging
63 timing stage:executeActions Completed in 43ms
64 timing stage:rollbackFailedOptional Completed in 0ms
65 silly install runPostinstallTopLevelLifecycles
66 silly build shiny-server@1.5.17
67 info linkStuff shiny-server@1.5.17
68 silly linkStuff shiny-server@1.5.17 has /home/chris as its parent node_modules
69 silly install shiny-server@1.5.17
70 info lifecycle shiny-server@1.5.17~install: shiny-server@1.5.17
71 verbose lifecycle shiny-server@1.5.17~install: unsafe-perm in lifecycle true
72 verbose lifecycle shiny-server@1.5.17~install: PATH: /home/chris/shiny-server/ext/node/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/chris/shiny-server/node_modules/.bin:/home/chris/shiny-server/ext/node/bin:/home/chris/shiny-server/bin:/home/chris/shiny-server/bin:/home/chris/shiny-server/shiny-server/bin:/home/chris/shiny-server/bin:/root/.nvm/versions/node/v15.12.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
73 verbose lifecycle shiny-server@1.5.17~install: CWD: /home/chris/shiny-server
74 silly lifecycle shiny-server@1.5.17~install: Args: [ '-c', 'node-gyp rebuild' ]
75 timing audit submit Completed in 332ms
76 http fetch POST 200 http://registry.npmjs.org/-/npm/v1/security/audits/quick 333ms
77 timing audit body Completed in 2ms
78 silly lifecycle shiny-server@1.5.17~install: Returned: code: 1 signal: null
79 info lifecycle shiny-server@1.5.17~install: Failed to exec install script
80 verbose stack Error: shiny-server@1.5.17 install: `node-gyp rebuild`
80 verbose stack Exit status 1
80 verbose stack at EventEmitter.<anonymous> (/home/chris/shiny-server/ext/node/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
80 verbose stack at EventEmitter.emit (events.js:314:20)
80 verbose stack at ChildProcess.<anonymous> (/home/chris/shiny-server/ext/node/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
80 verbose stack at ChildProcess.emit (events.js:314:20)
80 verbose stack at maybeClose (internal/child_process.js:1022:16)
80 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5)
81 verbose pkgid shiny-server@1.5.17
82 verbose cwd /home/chris/shiny-server
83 verbose Linux 5.10.17-v8+
84 verbose argv "/home/chris/shiny-server/ext/node/bin/node" "/home/chris/shiny-server/ext/node/lib/node_modules/npm/bin/npm-cli.js" "--python=/usr/bin/python" "install" "--no-optional"
85 verbose node v12.20.0
86 verbose npm v6.14.8
87 error code ELIFECYCLE
88 error errno 1
89 error shiny-server@1.5.17 install: `node-gyp rebuild`
89 error Exit status 1
90 error Failed at the shiny-server@1.5.17 install script.
90 error This is probably not a problem with npm. There is likely additional logging output above.
91 verbose exit [ 1, true ]
Sorry I'm not able to help more but perhaps this information is more helpful to you than to me! I am very keen to get the server running on the machine and on that OS if it's humanly possible so I am very happy to run any further suggestions you have. Many thanks again, Chris