2

I'm trying to install sqlite3 in Ubuntu 12.04. I tried sudo apt-get install sqlite3 but I get the following error:

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.

I've tried the answers to Unable to locate package sqlite3 without success.

karel
  • 114,770
dgrgge4
  • 219
  • 1
  • 3
  • 8
  • (http://askubuntu.com/questions/230619/cannot-install-sqlite3?rq=1) also does not work. Running command sudo apt-get install sqlite3-0:i386 shows E: FindIndex failed error. – dgrgge4 Jul 18 '13 at 17:46
  • 1
    Might help to add the information from: apt-cache policy sqlite3 libsqlite3-0; My guess would be you have the lib from -updates but then you disabled it somehow so it is trying to install sqlite3 from -release which can't satisfy the dep. Check software-properties-gtk and on the Updates tab make sure 'Recommended Updates' is checked, and if not check it and run: sudo apt-get update; then try installing again. – Jason Conti Jul 18 '13 at 19:00
  • sqlite3: Installed: (none) Candidate: 3.7.9-2ubuntu1 Version table: 3.7.9-2ubuntu1 0 500 http://archive.ubuntu.com/ubuntu/ precise/main i386 Packages 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 http://archive.ubuntu.com/ubuntu/ precise/main i386 Packages @JasonConti – dgrgge4 Jul 20 '13 at 06:16
  • Great Brother! @JasonConti. It worked. :-) Thanks for your great help. Please Give an answer so that I can upvote it and hit the accept button to give you some points. – dgrgge4 Jul 20 '13 at 06:20

1 Answers1

3

Often when the error:

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.

occurs with a package requiring a version of another package from the -release archive (the Ubuntu repositories frozen at the time an Ubuntu version is released), but it says it wants to install a version from the -updates archive, it usually means that the version from -updates is already installed.

This can be verified by running apt-cache policy other-package and checking which repository provided the package. In this case:

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

We see that 100 /var/lib/dpkg/status is the only line for the installed package, showing that it is manually installed. This can happen either when the -updates repository is disabled, or occasionally when some mirrors go out of date.

The -updates repository can be enabled again by running software-properties-gtk, verifying that on the Updates tab that Recommended Updates is checked, and then running sudo apt-get update.

Jason Conti
  • 2,371