node.js - 安装 npm 时出现 403 禁止 - Ubuntu 14.0

标签 node.js ubuntu npm ubuntu-14.04 npm-install

我正在尝试在我的 ubuntu 14.0 服务器上安装 npm 和 Nodejs。

我已经使用sudo apt-get install nodejs安装了nodejs,但是当我安装npm时,我收到了403 Forbidden错误。

    $ sudo apt-get install npm
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
gyp libc-ares-dev libjs-node-uuid libssl-dev libssl-doc libssl1.0.2
libv8-3.14-dev node-abbrev node-ansi node-archy node-async node-block-stream
node-combined-stream node-cookie-jar node-delayed-stream node-forever-agent
node-form-data node-fstream node-fstream-ignore node-github-url-from-git
node-glob node-graceful-fs node-gyp node-inherits node-ini
node-json-stringify-safe node-lockfile node-lru-cache node-mime
node-minimatch node-mkdirp node-mute-stream node-node-uuid node-nopt
node-normalize-package-data node-npmlog node-once node-osenv node-qs
node-read node-read-package-json node-request node-retry node-rimraf
node-semver node-sha node-sigmund node-slide node-tar node-tunnel-agent
node-which nodejs-dev zlib1g zlib1g-dev
Suggested packages:
node-hawk node-aws-sign node-oauth-sign node-http-signature
The following NEW packages will be installed:
gyp libc-ares-dev libjs-node-uuid libssl-dev libssl-doc libv8-3.14-dev
node-abbrev node-ansi node-archy node-async node-block-stream
node-combined-stream node-cookie-jar node-delayed-stream node-forever-agent
node-form-data node-fstream node-fstream-ignore node-github-url-from-git
node-glob node-graceful-fs node-gyp node-inherits node-ini
node-json-stringify-safe node-lockfile node-lru-cache node-mime
node-minimatch node-mkdirp node-mute-stream node-node-uuid node-nopt
node-normalize-package-data node-npmlog node-once node-osenv node-qs
node-read node-read-package-json node-request node-retry node-rimraf
node-semver node-sha node-sigmund node-slide node-tar node-tunnel-agent
node-which nodejs-dev npm zlib1g-dev
The following packages will be upgraded:
libssl1.0.2 zlib1g
2 upgraded, 53 newly installed, 0 to remove and 257 not upgraded.
Need to get 4,062 kB/5,590 kB of archives.
After this operation, 16.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] y

然后我说Y

WARNING: The following packages cannot be authenticated!
libssl1.0.2 libssl-dev libssl-doc
Install these packages without verification? [y/N] y

然后我说Y,这就是我收到禁止错误的地方。

Err http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main libssl1.0.2 amd64 1.0.2h-1+deb.sury.org~trusty+1
403  Forbidden
Err http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main libssl-dev amd64 1.0.2h-1+deb.sury.org~trusty+1
403  Forbidden
Err http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/ trusty/main libssl-doc all 1.0.2h-1+deb.sury.org~trusty+1
403  Forbidden
E: Failed to fetch http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/pool/main/o/openssl/libssl1.0.2_1.0.2h-1+deb.sury.org~trusty+1                                                                                                            _amd64.deb  403  Forbidden

E: Failed to fetch http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/pool/main/o/openssl/libssl-dev_1.0.2h-1+deb.sury.org~trusty+1_                                                                                                            amd64.deb  403  Forbidden

E: Failed to fetch http://ppa.launchpad.net/ondrej/php5-5.6/ubuntu/pool/main/o/openssl/libssl-doc_1.0.2h-1+deb.sury.org~trusty+1_                                                                                                            all.deb  403  Forbidden

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

我相信我在安装这些软件包时遇到了问题:

libssl1.0.2 libssl-dev libssl-doc

最佳答案

sudo apt-key update
sudo apt-get update

它应该可以工作。

关于node.js - 安装 npm 时出现 403 禁止 - Ubuntu 14.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53942030/

相关文章:

node.js - Node js - 连接池的 http.request() 问题

android - 带有 Android 64 Bundle 的 Ubuntu 64 找不到 adb 可执行文件

ruby-on-rails - Passenger 没有安装官方的 Ubuntu Nginx 包

javascript - 如何从其他 npm 依赖项导入模块依赖项?

javascript - 具有多个条目的 Webpack 5 ChunkGroup API?

javascript - 如何根据另一个 npm 脚本的输出设置条件 npm 脚本?

javascript - Passportjs验证失败

node.js - Passport-SAML:读取用户信息

node.js - 已处理的 'Uncaught Exception' 仍然以某种方式使应用程序崩溃

c++ - boost Python(Suse 和 Ubuntu)