3

My qtcreator was not working properly and was missing things like examples, tutorials etc. So I basically decided to do a clean install of all qt5 packages. I ppa-purge the official ubuntu-sdk ppa and tried to reinstall everything.

I added the 2 ppa mentioned in developer.ubuntu.com. I installed qtcreator and now it all works. However when I tried to update my 12.04 system, I now see the error message that there is an unmet dependency.

On running sudo apt-get dist-upgrade I get the following error output,

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 libqt4-opengl-dev : Depends: libqt4-dev (= 4:4.8.1-0ubuntu4.4) but it is not installed
 libqtwebkit-dev : Depends: libqt4-dev (>= 4:4.8.0~) but it is not installed
E: Unmet dependencies. Try using -f.

So it seems that libqt4-dev is not installed. I try installing it based on the error message by sudo apt-get -f install libqt4-dev. But then I get this error message,

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  libmysqlclient-dev libpq-dev libsqlite3-dev unixodbc-dev
The following NEW packages will be installed:
  libqt4-dev
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
39 not fully installed or removed.
Need to get 0 B/2,516 kB of archives.
After this operation, 18.0 MB of additional disk space will be used.
(Reading database ... 416905 files and directories currently installed.)
Unpacking libqt4-dev (from .../libqt4-dev_4%3a4.8.1-0ubuntu4.4_i386.deb) ...
dpkg: error processing /var/cache/apt/archives/libqt4-dev_4%3a4.8.1-0ubuntu4.4_i386.deb (--unpack):
 trying to overwrite '/usr/bin/uic3', which is also in package qtchooser 0.0.1~git20121229.g8f08405-0ubuntu1~precise1~test5
dpkg-deb (subprocess): subprocess data was killed by signal (Broken pipe)
dpkg-deb: error: subprocess <decompress> returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/libqt4-dev_4%3a4.8.1-0ubuntu4.4_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

How do I fix this?

[EDIT 1]: In response to asclepix's anser, I tried removing qtchooser by sudo apt-get remove qtchooser, however the output I get is,

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 libqt4-opengl-dev : Depends: libqt4-dev (= 4:4.8.1-0ubuntu4.4) but it is not going to be installed
 libqtwebkit-dev : Depends: libqt4-dev (>= 4:4.8.0~) but it is not going to be installed
 qt5-default : Depends: qtchooser but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

2 Answers 2

0

It seems it conflicts with the qtchooser package:

trying to overwrite '/usr/bin/uic3', which is also in package qtchooser 0.0.1~git20121229.g8f08405-0ubuntu1~precise1~test5

I've got qt4 and qt4-dev, but no qtchooser (perhaps because I'm in 12.10). I think this package is to choose between qt3 and qt4 or qt5. If it's possible (have you got qt3? qt5?), try to disinstall qtchooser.

0

I had the same problem on my computer after the installation of Ubuntu SDK. I foudn the solution here. Your have to follow step with the PPA, I put the solution here but I advise you to follow the tutorial.

How do I resolve unmet dependencies after adding a PPA?

Disable/Remove/Purge PPAs:

PPAs (Personal Package Archive) are repositories hosted on Launchpad. You can use PPAs to install or upgrade packages that are not available in the official Ubuntu repositories.

One of the most common causes of unmet dependencies are PPAs, specially when used to upgrade the existing package in Ubuntu repositories. To solve the problem you have tree options, disable, purge (revert back to original package in Ubuntu repositories) or remove PPA.

Disable:

Disabling a PPA means no more updates for the packages installed from that PPA. To disable a PPA: Open Software Center > Edit > Software Sources Or,

Hit Alt+F2 and run software-properties-gtk.

Click on Other Software tab, you'll see that each PPA have two lines here, one for the compiled packages and one for the source, Uncheck both lines to disable a PPA. Hare you can also add and remove PPAs.
Purge:

Purging a PPA means, downgrading the packages in the selected PPA to the version in the official Ubuntu repositories and disabling that PPA. PPA Purge does exactly that. To install PPA Purge run the following command:

sudo apt-get install ppa-purge

But, Considering the question apt is broken so the above command will fail. So use this command

mkdir ppa-purge && cd ppa-purge && wget http://mirror.pnl.gov/ubuntu/pool/universe/p/ppa-purge/ppa-purge_0.2.8+bzr56_all.deb && wget http://mirror.pnl.gov/ubuntu//pool/main/a/aptitude/aptitude_0.6.6-1ubuntu1_i386.deb && sudo dpkg -i ./*.deb

To use PPA Purge:

sudo ppa-purge ppa:someppa/ppa

If 'ppa-purge' command fails for some reason, you can't run 'ppa-purge' again unless you re-enable the PPA (To enable the PPA follow the same steps as disabling a PPA and Check the both lines of a particular PPA to enable it).

Note: PPA Purge doesn't remove PPAs (may be in future), So you'll have to manually remove the PPA.

It's worked for me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .