如何从头安装 sqlite3

如何从头安装 sqlite3

我正在尝试在 Ubuntu 12.04 中安装 sqlite3。我试过了sudo apt-get install sqlite3,但出现以下错误:

tanvir@TanvirPC:~$ 'sqlite3' is currently not installed. You can install it by  
typing: sudo apt-get install sqlite3
tanvir@TanvirPC:~$ sudo apt-get install sqlite3
[sudo] password for tanvir:
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:
sqlite3 : Depends: libsqlite3.0 (= 3.7.9-2ubuntu1) but 3.7.9-2ubuntu1.1 is to  
be installed
E: Unable to correct problems, you have held broken packages.

我已经尝试过答案无法找到包 sqlite3没有成功。

答案1

经常出现这样的错误:

The following packages have unmet dependencies:

  a-package: Depends: other-package (= version-in-release) but version-in-updates is to
             be installed
E: Unable to correct problems, you have held broken packages.

发生在需要另一个软件包的版本的软件包中-发布存档(Ubuntu 版本发布时冻结的 Ubuntu 存储库),但它说它想安装来自-更新存档,通常意味着来自-更新已安装。

可以通过运行并检查哪个存储库提供了该包来验证这一点apt-cache policy other-package。在本例中:

libsqlite3-0:
Installed: 3.7.9-2ubuntu1.1
Candidate: 3.7.9-2ubuntu1.1

Version table:
  *** 3.7.9-2ubuntu1.1 0
        100 /var/lib/dpkg/status
      3.7.9-2ubuntu1 0
        500 archive.ubuntu.com/ubuntu precise/main i386 Packages

我们看到这100 /var/lib/dpkg/status是已安装软件包的唯一一行,表明它是手动安装的。当-更新存储库被禁用,或者偶尔某些镜像过期。

-更新可以通过运行来再次启用存储库software-properties-gtk,验证更新选项卡Recommended Updates,然后运行sudo apt-get update

相关内容