Debian

嘗試安裝 debian 軟體包 npm,使 apt-get 刪除 libssl-dev

  • June 7, 2018
:~/$ uname -a
Linux hostname 4.9.0-4-rt-amd64 #1 SMP PREEMPT RT Debian 4.9.51-1 (2017-09-28) x86_64 GNU/Linux

我認為我有一個清晰的依賴樹,沒有損壞的包。

:~/$ sudo apt-get check
Reading package lists... Done
Building dependency tree       
Reading state information... Done

但是,當我嘗試安裝時npm,apt-get 想要刪除libssl-dev

:~$ sudo apt-get install npm
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
 libldns2 libssl-doc
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
 gyp libjs-inherits libjs-node-uuid libssl1.0-dev libuv1-dev node-abbrev node-ansi node-ansi-color-table node-archy node-async node-balanced-match node-block-stream node-brace-expansion node-builtin-modules
 node-combined-stream node-concat-map node-cookie-jar node-delayed-stream node-forever-agent node-form-data node-fs.realpath node-fstream node-fstream-ignore node-github-url-from-git node-glob
 node-graceful-fs node-gyp node-hosted-git-info node-inflight node-inherits node-ini node-is-builtin-module node-isexe 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-path-is-absolute node-pseudomap node-qs node-read node-read-package-json node-request
 node-retry node-rimraf node-semver node-sha node-slide node-spdx-correct node-spdx-expression-parse node-spdx-license-ids node-tar node-tunnel-agent node-underscore node-validate-npm-package-license
 node-which node-wrappy node-yallist nodejs nodejs-dev nodejs-doc
Suggested packages:
 node-hawk node-aws-sign node-oauth-sign node-http-signature debhelper
The following packages will be REMOVED:
 libldns-dev libssl-dev
The following NEW packages will be installed:
 gyp libjs-inherits libjs-node-uuid libssl1.0-dev libuv1-dev node-abbrev node-ansi node-ansi-color-table node-archy node-async node-balanced-match node-block-stream node-brace-expansion node-builtin-modules
 node-combined-stream node-concat-map node-cookie-jar node-delayed-stream node-forever-agent node-form-data node-fs.realpath node-fstream node-fstream-ignore node-github-url-from-git node-glob
 node-graceful-fs node-gyp node-hosted-git-info node-inflight node-inherits node-ini node-is-builtin-module node-isexe 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-path-is-absolute node-pseudomap node-qs node-read node-read-package-json node-request
 node-retry node-rimraf node-semver node-sha node-slide node-spdx-correct node-spdx-expression-parse node-spdx-license-ids node-tar node-tunnel-agent node-underscore node-validate-npm-package-license
 node-which node-wrappy node-yallist nodejs nodejs-dev nodejs-doc npm
0 upgraded, 71 newly installed, 2 to remove and 32 not upgraded.
Need to get 7,517 kB of archives.
After this operation, 25.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

我的sources.list

$ cat /etc/apt/sources.list

deb http://ftp.us.debian.org/debian sid main contrib non-free
deb-src http://ftp.us.debian.org/debian sid main contrib non-free

# 3rd party
# deb http://www.deb-multimedia.org unstable main non-free
deb [arch=amd64] https://download.docker.com/linux/debian stretch stable
# deb-src [arch=amd64] https://download.docker.com/linux/debian stretch stable
deb http://http.us.debian.org/debian/ stretch main non-free contrib

任何想法為什麼?你認為我應該報告錯誤嗎?

您沒有做錯任何事情:npm取決於node-gyp,取決於nodejs-dev,取決於libssl1.0-dev,與 衝突libssl-dev。因此,目前無法在 Debian 不穩定版中同時擁有npmlibssl-dev安裝;這被歸檔為錯誤 #850660

除了訂閱錯誤以了解情況的任何變化之外,您無能為力…

我通過從 nvm 安裝節點“解決”了這個問題。 https://github.com/creationix/nvm

引用自:https://unix.stackexchange.com/questions/408425