由于软件包冲突,升级后无法安装 bitcoind

由于软件包冲突,升级后无法安装 bitcoind

我之前使用的是 Ubuntu 10.04,我尝试安装bitcoind。安装失败,我升级到了 Ubuntu 12.04。运行时bitcoind仍然不起作用:

$ bitcoind    
************************
EXCEPTION: 11DbException       
Db::open: Invalid argument       
bitcoin in AppInit()       

terminate called after throwing an instance of 'DbException'
  what():  Db::open: Invalid argument
Aborted (core dumped)

另外,尝试重新安装也不起作用:

$ sudo apt-get install bitcoind
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  bitcoind
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 981 kB of archives.
After this operation, 2,873 kB of additional disk space will be used.
Get:1 http://ppa.launchpad.net/bitcoin/bitcoin/ubuntu/ precise/main bitcoind amd64 0.8.5-precise1 [981 kB]
Fetched 981 kB in 7s (130 kB/s)                                                                                               
(Reading database ... 222704 files and directories currently installed.)
Unpacking bitcoind (from .../bitcoind_0.8.5-precise1_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/bitcoind_0.8.5-precise1_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/bitcoind', which is also in package bitcoin 0.3.24-ppa2~lucid
No apport report written because MaxReports is reached already
                                                              dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/bitcoind_0.8.5-precise1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

我该如何开始bitcoind工作?如果需要的话,我不介意卸载并重新安装。

更新 1

我刚刚尝试删除该包并再次安装,但仍然没有成功:

$ sudo apt-get remove --purge bitcoind
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package bitcoind is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.

$ sudo apt-get install bitcoind
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  bitcoind
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 981 kB of archives.
After this operation, 2,873 kB of additional disk space will be used.
Get:1 http://ppa.launchpad.net/bitcoin/bitcoin/ubuntu/ precise/main bitcoind amd64 0.8.5-precise1 [981 kB]
Fetched 981 kB in 7s (136 kB/s)                                                                                               
(Reading database ... 222704 files and directories currently installed.)
Unpacking bitcoind (from .../bitcoind_0.8.5-precise1_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/bitcoind_0.8.5-precise1_amd64.deb (--unpack):
 trying to overwrite '/usr/bin/bitcoind', which is also in package bitcoin 0.3.24-ppa2~lucid
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/bitcoind_0.8.5-precise1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

尝试一下,看看是否能安装。首先安装运行 bitcoind 所需的先决条件。

只需按下键盘上的Ctrl+ Alt+T即可打开终端。打开后,运行以下命令:

sudo apt-get purge bitcoind
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:bitcoin/bitcoin
sudo apt-get update
sudo apt-get install bitcoind

然后一切都好。

答案2

软件包bitcoin还在!已安装!

完整的命令集是:

sudo apt-get purge bitcoin*
sudo apt-get update
sudo apt-get install bitcoind

问题是您还有一个名为 的包bitcoin尚未卸载。一旦您卸载,您的安装应该就可以了。

这应该作为错误报告给软件包管理员

答案3

最终的解决方案是:

sudo dpkg -i --force-overwrite /var/cache/apt/archives/bitcoind_0.8.5-precise1_amd64.deb

相关内容