+
Skip to content

Wrong architecture reported by uname on Rasperry Pi 4 causes "cannot execute: required file not found" error #297

@kheston

Description

@kheston

There is an issue with uname -m on the Raspberry Pi 4 in which the wrong system architecture is reported when a 32-bit OS is used. The result is this error when attempting to run the nvs installer:

pi@raspberrypi:~ $ . "$NVS_HOME/nvs.sh" install
Downloading bootstrap node from https://nodejs.org/dist/v16.20.2/node-v16.20.2-linux-arm64.tar.xz
######################################################################################## 100.0%

-bash: /home/pi/.nvs/cache/node: cannot execute: required file not found

To workaround this, I hard-coded the architecture in net.sh.

More specifically, I changed this line:
local NODE_ARCH="$(uname -m | sed -e 's/x86_64/x64/;s/i86pc/x64/;s/i686/x86/;s/aarch64/arm64/')"
to:
local NODE_ARCH="armv7l"

This forces the installer to use a 32bit version of node and the installer succeeds.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载