node.js - Ubuntu,无法安装 zlib1g-dev

标签 node.js ubuntu zlib

我正在尝试在 Ubuntu 中安装 nodejs,在检查了所有缺少的依赖项后,我在安装 zlib1g-dev 时遇到了一个问题,zlib1g 已经位于 1:1.2.8.dfsg-2ubuntu4.1 :

[pp@src]$ sudo apt-get install zlib1g-dev

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:
 zlib1g-dev : **Depends: zlib1g (= 1:1.2.8.dfsg-2ubuntu4) but 1:1.2.8.dfsg-2ubuntu4.1 is to be installed**
E: Unable to correct problems, you have held broken packages.


[pp@src]$ sudo apt-get install zlib1g

Reading package lists... Done
Building dependency tree       
Reading state information... Done
**zlib1g is already the newest version (1:1.2.8.dfsg-2ubuntu4.1)**.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

最佳答案

我能够通过以下方式进行安装:

sudo apt-get update && sudo sudo apt-get install zlib1g-dev

使用以下内容更新/etc/apt/sources.list 后:

#------------------------------------------------------------------------------#
#                            OFFICIAL UBUNTU REPOS                             #
#------------------------------------------------------------------------------#


###### Ubuntu Main Repos
deb http:// us.archive .ubuntu. com/ubuntu/ xenial main restricted universe multiverse 
deb-src http:// us.archive .ubuntu. com/ubuntu/ xenial main restricted universe multiverse 

###### Ubuntu Update Repos
deb http:// us.archive .ubuntu. com/ubuntu/ xenial-security main restricted universe multiverse 
deb http://us.archive .ubuntu. com/ubuntu/ xenial-updates main restricted universe multiverse 
deb http:// us.archive .ubuntu. com/ubuntu/ xenial-proposed main restricted universe multiverse 
deb-src http:// us.archive .ubuntu. com/ubuntu/ xenial-security main restricted universe multiverse 
deb-src http:// us.archive .ubuntu. com/ubuntu/ xenial-updates main restricted universe multiverse 
deb-src http:// us.archive .ubuntu. com/ubuntu/ xenial-proposed main restricted universe multiverse 

###### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner

关于node.js - Ubuntu,无法安装 zlib1g-dev,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48243970/

相关文章:

c++ - 将 zlib 与 mingw 一起使用

linux - 当从我的 c 程序中调用时,如何将数据传递给使用 stdin/stdout 的 zlib 的 zpipe 可执行文件?

javascript - node.js TypeError : path must be absolute or specify root to res. sendFile [无法解析JSON]

android - 无法在 Android Studio 3.0.1 (Ubuntu 17.10 x64) 中使用 "Start a new Android project"

java - apache.hadoop.mapred.JobClient.runJob失败

linux - meteor 安装失败 - 仅达到 45%

c++ - 如何使用特定版本的 zlib 在 ubuntu 上构建 openssl?

javascript - 为什么我绑定(bind)的这个对象被忽略了?

javascript - 如何解决 "slider' s all images display "in Angularjs But in HTML slider works correctly

node.js - 在 NodeJS/Bluemix 中强制使用 SSL