在 ubuntu 中卸载 Berkeley DB

在 ubuntu 中卸载 Berkeley DB

我安装了Berkeley DB 6.2.23表单本教程。在此之前,我还是libdb5.3从 ubuntu 存储库安装的。现在,当我在命令行中运行 Perl 脚本时,出现此错误:

DB_File was build with libdb version 6.2.23, 
but you are attempting to run it with libdb version 5.3.28
Compilation failed in require at ./ROUGE-1.5.5.pl line 174.

我猜想这两个包的安装存在问题,但是在删除 libdb5.3 期间出现许多依赖性错误:

The following packages have unmet dependencies:
 adduser : Depends: passwd (>= 1:4.1.5.1-1.1ubuntu6)
 libkf5service5 : Depends: libkf5dbusaddons5 (>= 4.97.0) but it is not going to be installed
                  Recommends: libkf5service-bin (= 5.18.0-0ubuntu1) but it is not going to be installed
 libpam-modules : PreDepends: libdb5.3 but it is not going to be installed
                  Recommends: update-motd but it is not going to be installed
 libqt5svg5 : Depends: libqt5widgets5 (>= 5.3.0) but it is not going to be installed
 libqtgui4:i386 : Depends: libsm6:i386 but it is not going to be installed
 libsm6 : Depends: libuuid1 (>= 2.16) but it is not going to be installed
 libxt6:i386 : Depends: libsm6:i386 but it is not going to be installed
 openssh-client : Depends: passwd
 procps : Depends: initscripts
 python3 : Depends: python3.5 (>= 3.5.1-2~) but it is not going to be installed
           Depends: libpython3-stdlib (= 3.5.1-3) but it is not going to be installed
           Depends: dh-python but it is not going to be installed
 python3-requests : Depends: python3-urllib3 (>= 1.13.1) but it is not going to be installed
                    Depends: python3-chardet but it is not going to be installed
                    Depends: python3-urllib3 (< 1.13.2) but it is not going to be installed
 wget : Depends: libuuid1 (>= 2.16) but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

因此,我想从我的系统中卸载版本 6.2.23,并且想知道如何操作。

答案1

我已经解决了您遇到的问题。由于数据库存在一些依赖关系,因此很难以常规方式安装数据库。您需要根据以下指南安装数据库。

1. 安装berkeley-db

请使用以下命令安装 berkeley-db:

$ wget http://download.oracle.com/berkeley-db/db-4.8.30.zip
$ unzip db-4.8.30.zip
$ cd db-4.8.30/
$ cd build_unix/
$ ../dist/configure --prefix=/usr/local --enable-cxx
$ make -j12
$ make install
$ sudo make install

上述命令可以安装以下 bsddb3 所需的库。

2. 安装 bsddb3-6.26:

$ wget https://files.pythonhosted.org/packages/e9/fc/ebfbd4de236b493f9ece156f816c21df0ae87ccc22604c5f9b664efef1b9/bsddb3-6.2.6.tar.gz
$ tar -xvzf bsddb3-6.2.6.tar.gz
$ cd bsddb3-6.2.6/
$ python setup.py install --berkeley-db=/usr/local/

安装完成后会提示如下信息:Processing dependency for bsddb3==6.2.6 Finished processing dependency for bsddb3==6.2.6.

干杯,

麦克风

相关内容