在树莓派上安装node.js 12时出现依赖性错误

时间:2020-04-13 12:09:08

标签: node.js raspberry-pi raspbian

尝试在覆盆子上安装node.js时,我仍然遇到此错误

The following packages have unmet dependencies:
 nodejs : Depends: libstdc++6 (>= 5.2) but 4.9.2-10+deb8u2 is to be installed
E: Unable to correct problems, you have held broken packages.

完整的安装日志

pi@raspberrypi:~ $ sudo su
root@raspberrypi:/home/pi# curl -sL https://deb.nodesource.com/setup_12.x | sudo bash -

## Installing the NodeSource Node.js 12.x repo...


## Populating apt-get cache...

+ apt-get update
"deleted url cos SPAM detection"
Ign https://deb.nodesource.com jessie/main Translation-en
Reading package lists... Done

## You seem to be using Devuan version jessie.
## This maps to Debian "jessie"... Adjusting for you...

## Confirming "jessie" is supported...

+ curl -sLf -o /dev/null 'https://deb.nodesource.com/node_12.x/dists/jessie/Release'

## Adding the NodeSource signing key to your keyring...

+ curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add -
OK

## Creating apt sources list file for the NodeSource Node.js 12.x repo...

+ echo 'deb https://deb.nodesource.com/node_12.x jessie main' > /etc/apt/sources.list.d/nodesource.list
+ echo 'deb-src https://deb.nodesource.com/node_12.x jessie main' >> /etc/apt/sources.list.d/nodesource.list

## Running `apt-get update` for you...

+ apt-get update
"deleted url cos SPAM detection"
Fetched 5,379 B in 10s (521 B/s)
Reading package lists... Done

## Run `sudo apt-get install -y nodejs` to install Node.js 12.x and npm
## You may also need development tools to build native addons:
     sudo apt-get install gcc g++ make
## To install the Yarn package manager, run:
     curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
     echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
     sudo apt-get update && sudo apt-get install yarn


root@raspberrypi:/home/pi# apt-get install nodejs -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 nodejs : Depends: libstdc++6 (>= 5.2) but 4.9.2-10+deb8u2 is to be installed
E: Unable to correct problems, you have held broken packages.
root@raspberrypi:/home/pi# node -v
root@raspberrypi:/home/pi# npm -v
bash: npm: command not found
root@raspberrypi:/home/pi#

有什么解决办法吗?

0 个答案:

没有答案