Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm trying to install PyQt but i've met some difficulties (i.e packages that won't be updated and stuff like that). I'm not very proficient with Ubuntu, so some help is needed. Here's the output i get from the terminal:

sudo apt-get install python-qt4
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:
 python-qt4 : Depends: libqt4-declarative (>= 4:4.7.0~rc1) but it is not going to be installed
              Depends: libqt4-designer (>= 4:4.7.0) but it is not going to be installed
              Depends: libqt4-help (>= 4:4.7.0) but it is not going to be installed
              Depends: libqt4-script (>= 4:4.7.0) but it is not going to be installed
              Depends: libqt4-scripttools (>= 4:4.7.0) but it is not going to be installed
              Depends: libqt4-svg (>= 4:4.7.0) but it is not going to be installed
              Depends: libqt4-test (>= 4:4.7.0) but it is not going to be installed
              Depends: libqt4-xmlpatterns (>= 4:4.7.0) but it is not going to be installed
E: Broken packages
share|improve this question
add comment

4 Answers

It can't install the but python-qt4 because the libqt4* packages are not found in the repositories.
My guess is that you are missing one of the canonical repositories so will you please launch Software Sources and under Ubuntu Software tab make sure it is set similar to:

enter image description here

After changing setting make sure you run sudo apt-get update. You are then ready to retry the installation.

share|improve this answer
1  
yes, it worked for me! thanks –  fransua Mar 23 '12 at 15:02
add comment

Did you refreshed your repositories? If not, try: sudo apt-get update and then try to install again.

You can also try the following command if there is some broken package issue on your system: sudo apt-get check.

share|improve this answer
add comment

I'm pretty sure using

sudo apt-get update

and then

sudo apt-get install -f

will do the trick.

share|improve this answer
add comment

terminal: gksudo nautilus

navigate to /var/lib/dpkg/info remove the broken package(s) libqt4

navigate to /var/lib/dpkg/status and do the same. (Mind: on the right is a search option to find the package(s))

Close nautilus.

important: sudo apt-get update

         sudo apt-get upgrade
share|improve this answer
    
I'm not entirely sure why you think that the dpkg database is broken, but broken or not, editing it by hand sounds like a reallly good way to break a system beyond recovery. Please don't recommend it to users unless you have very compelling evidence that that's needed. –  Evan Broder Dec 11 '11 at 9:31
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.