尝试安装 Hadoop 的 Bigtop 发行版时遇到以下错误。
Errors were encountered while processing:
/var/cache/apt/archives/oozie_4.3.0-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
我努力了:
sudo dpkg --configure -a
sudo apt-get install -f
cat /etc/apt/sources.list
以及 Bigtop 的不同版本,均未成功。
我应该怎么办?
细节:
root@ubuntu:/home/mastelaro# sudo apt-get install hadoop\* flume-* oozie\* hive\* pig\*
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'hadoop-hdfs-datanode' for glob 'hadoop*'
Note, selecting 'hadoop-hdfs-namenode' for glob 'hadoop*'
Note, selecting 'hadoop' for glob 'hadoop*'
Note, selecting 'hadoop-httpfs' for glob 'hadoop*'
Note, selecting 'hadoop-hdfs-fuse' for glob 'hadoop*'
Note, selecting 'hadoop-hdfs' for glob 'hadoop*'
Note, selecting 'hadoop-hdfs-zkfc' for glob 'hadoop*'
Note, selecting 'hadoop-mapreduce-historyserver' for glob 'hadoop*'
Note, selecting 'hadoop-yarn' for glob 'hadoop*'
Note, selecting 'hadoop-doc' for glob 'hadoop*'
Note, selecting 'hadoop-yarn-nodemanager' for glob 'hadoop*'
Note, selecting 'hadoop-yarn-proxyserver' for glob 'hadoop*'
Note, selecting 'hadoop-hdfs-secondarynamenode' for glob 'hadoop*'
Note, selecting 'hadoop-hdfs-journalnode' for glob 'hadoop*'
Note, selecting 'hadoop-conf-pseudo' for glob 'hadoop*'
Note, selecting 'hadoop-yarn-timelineserver' for glob 'hadoop*'
Note, selecting 'hadoop-yarn-resourcemanager' for glob 'hadoop*'
Note, selecting 'hadoop-client' for glob 'hadoop*'
Note, selecting 'hadoop-mapreduce' for glob 'hadoop*'
Note, selecting 'flume-agent' for glob 'flume-*'
Note, selecting 'oozie' for glob 'oozie*'
Note, selecting 'oozie-client' for glob 'oozie*'
Note, selecting 'hive-webhcat-server' for glob 'hive*'
Note, selecting 'hive-jdbc' for glob 'hive*'
Note, selecting 'hive-hcatalog' for glob 'hive*'
Note, selecting 'hive' for glob 'hive*'
Note, selecting 'hive-hbase' for glob 'hive*'
Note, selecting 'hive-metastore' for glob 'hive*'
Note, selecting 'hive-server2' for glob 'hive*'
Note, selecting 'hive-webhcat' for glob 'hive*'
Note, selecting 'hive-hcatalog-server' for glob 'hive*'
Note, selecting 'pig' for glob 'pig*'
Note, selecting 'pig-udf-datafu' for glob 'pig*'
Note, selecting 'pigz' for glob 'pig*'
pigz is already the newest version (2.3.1-2).
hive is already the newest version (1.2.1-1).
hive-hbase is already the newest version (1.2.1-1).
hive-hcatalog is already the newest version (1.2.1-1).
hive-hcatalog-server is already the newest version (1.2.1-1).
hive-jdbc is already the newest version (1.2.1-1).
hive-metastore is already the newest version (1.2.1-1).
hive-server2 is already the newest version (1.2.1-1).
hive-webhcat is already the newest version (1.2.1-1).
hive-webhcat-server is already the newest version (1.2.1-1).
pig is already the newest version (0.15.0-1).
flume-agent is already the newest version (1.7.0-1).
hadoop is already the newest version (2.7.3-1).
hadoop-client is already the newest version (2.7.3-1).
hadoop-conf-pseudo is already the newest version (2.7.3-1).
hadoop-doc is already the newest version (2.7.3-1).
hadoop-hdfs is already the newest version (2.7.3-1).
hadoop-hdfs-datanode is already the newest version (2.7.3-1).
hadoop-hdfs-fuse is already the newest version (2.7.3-1).
hadoop-hdfs-journalnode is already the newest version (2.7.3-1).
hadoop-hdfs-namenode is already the newest version (2.7.3-1).
hadoop-hdfs-secondarynamenode is already the newest version (2.7.3-1).
hadoop-hdfs-zkfc is already the newest version (2.7.3-1).
hadoop-httpfs is already the newest version (2.7.3-1).
hadoop-mapreduce is already the newest version (2.7.3-1).
hadoop-mapreduce-historyserver is already the newest version (2.7.3-1).
hadoop-yarn is already the newest version (2.7.3-1).
hadoop-yarn-nodemanager is already the newest version (2.7.3-1).
hadoop-yarn-proxyserver is already the newest version (2.7.3-1).
hadoop-yarn-resourcemanager is already the newest version (2.7.3-1).
hadoop-yarn-timelineserver is already the newest version (2.7.3-1).
oozie-client is already the newest version (4.3.0-1).
pig-udf-datafu is already the newest version (1.3.0-1).
The following NEW packages will be installed:
oozie
0 upgraded, 1 newly installed, 0 to remove and 63 not upgraded.
Need to get 0 B/400 MB of archives.
After this operation, 414 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 193651 files and directories currently installed.)
Preparing to unpack .../archives/oozie_4.3.0-1_all.deb ...
Unpacking oozie (4.3.0-1) ...
dpkg: error processing archive /var/cache/apt/archives/oozie_4.3.0-1_all.deb (--unpack):
trying to overwrite '/usr/lib/oozie/lib/api-asn1-api-1.0.0-M20.jar', which is also in package oozie-client 4.3.0-1
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for systemd (229-4ubuntu19) ...
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
/var/cache/apt/archives/oozie_4.3.0-1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
运行以下命令将解决该问题。
dpkg -i --force-overwrite /var/cache/apt/archives/oozie_4.3.0-1_all.deb
或者
dpkg -i --force-all /var/cache/apt/archives/oozie_4.3.0-1_all.deb
apt-get -f install