我已经在这里声明了 repo:
cat /etc/apt/sources.list.d/cloudera.list
# Packages for Cloudera's Distribution for Hadoop, Version 5, on Ubuntu 14.04 amd64
deb [arch=amd64] http://archive.cloudera.com/cdh5/ubuntu/trusty/amd64/cdh trusty-cdh5.3.3 contrib
deb-src http://archive.cloudera.com/cdh5/ubuntu/trusty/amd64/cdh trusty-cdh5.3.3 contrib
和偏好设置如下:
cat /etc/apt/preferences.d/cloudera.pref
Package: *
Pin: release o=Cloudera, l=Cloudera
Pin-Priority: 501
然后我有“问题”包。它应该从“Cloudera”存储库中获取。这就是使用首选项的原因。描述如下:http://www.cloudera.com/content/cloudera/en/documentation/core/latest/topics/cdh_ig_cdh5_install.html#topic_4_4_1_unique_2__section_dfx_p51_nj_unique_2
当我要求 apt 显示包 Origin 时,我发现它是从 Ubuntu 仓库获取的,而不是从 Cloudera 仓库获取的:
sudo apt-cache show libzookeeper-java
Package: libzookeeper-java
Priority: optional
Section: universe/java
Installed-Size: 1335
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Debian Java Maintainers <[email protected]>
Architecture: all
Source: zookeeper
Version: 3.4.5+dfsg-1
Depends: libjline-java, liblog4j1.2-java (>> 1.2.15-8), libnetty-java, libslf4j-java, libxerces2-java
Recommends: libzookeeper-java-doc
Filename: pool/universe/z/zookeeper/libzookeeper-java_3.4.5+dfsg-1_all.deb
Size: 1237412
MD5sum: 2d2793872aa6faf93cce49dd85600b95
SHA1: cdda8da7cd5c7a4be68c02e39a818cd48fd81afd
SHA256: e09f600f09a425446d1456b758614018699d45e17214577dd09b0e8637fef9a9
Description-en: Core Java libraries for zookeeper
ZooKeeper is a centralized, reliable, service for maintaining configuration
information, naming, providing distributed synchronization, and group
services. All of these kinds of services are used in some form or another by
distributed applications.
.
This package contains the java .jar files.
Description-md5: 9d8746036f857b6258f6cc81bcc7fbb8
Homepage: http://zookeeper.apache.org
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Origin: Ubuntu
我做错了什么?
PS这可能是一个问题:
apt-cache showpkg zookeeper
Package: zookeeper
Versions:
3.4.5+dfsg-1 (/var/lib/apt/lists/eu-west-1.ec2.archive.ubuntu.com_ubuntu_dists_trusty_universe_binary-amd64_Packages)
Description Language:
File: /var/lib/apt/lists/eu-west-1.ec2.archive.ubuntu.com_ubuntu_dists_trusty_universe_binary-amd64_Packages
MD5: 0a45f324b8251b96598372f069b4c228
Description Language: en
File: /var/lib/apt/lists/eu-west-1.ec2.archive.ubuntu.com_ubuntu_dists_trusty_universe_i18n_Translation-en
MD5: 0a45f324b8251b96598372f069b4c228
3.4.5+cdh5.3.3+84-1.cdh5.3.3.p0.8~trusty-cdh5.3.3 (/var/lib/apt/lists/archive.cloudera.com_cdh5_ubuntu_trusty_amd64_cdh_dists_trusty-cdh5.3.3_contrib_binary-amd64_Packages) (/var/lib/dpkg/status)
Description Language:
File: /var/lib/apt/lists/archive.cloudera.com_cdh5_ubuntu_trusty_amd64_cdh_dists_trusty-cdh5.3.3_contrib_binary-amd64_Packages
MD5: b4638643f4a1a2e968cdf61ab4ddcf41
看起来,由于首选项配置错误,zookeeper 并未从 Cloudera repo 中获取?
答案1
所以我已经清理了所有:
sudo apt-get --purge remove all_custom_packages
然后重新运行sudo apt-get install things-i-need
它就开始工作了。
这是命令的输出
apt-cache policy zookeeper
zookeeper:
Installed: 3.4.5+cdh5.3.3+84-1.cdh5.3.3.p0.8~trusty-cdh5.3.3
Candidate: 3.4.5+cdh5.3.3+84-1.cdh5.3.3.p0.8~trusty-cdh5.3.3
Version table:
3.4.5+dfsg-1 0
500 http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages
*** 3.4.5+cdh5.3.3+84-1.cdh5.3.3.p0.8~trusty-cdh5.3.3 0
501 http://archive.cloudera.com/cdh5/ubuntu/trusty/amd64/cdh/ trusty-cdh5.3.3/contrib amd64 Packages
100 /var/lib/dpkg/status