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 am trying to install the library libg2c0, which is required for the package xfoil. However this package is unavailable at ubuntu 12.04. I tried the suggestions from https://twiki.cern.ch/twiki/bin/view/Sandbox/HCALRadiationProject:

sudo nano /etc/apt/sources.list

I added the following lines at the end of the file:

deb http://archive.ubuntu.com/ubuntu hardy main universe 
deb-src http://archive.ubuntu.com/ubuntu hardy main 
deb http://archive.ubuntu.com/ubuntu hardy-updates main universe 
deb-src http://archive.ubuntu.com/ubuntu hardy-updates main universe

Update the list and install the library:

sudo apt-get update
sudo apt-get install libg2c0

When these commands are executed I get the error:

The following packages have unmet dependencies:
 libg2c0 : Depends: gcc-3.4-base (= 3.4.6-6ubuntu5) but it is not going to be installed

Additionally I tried to install the package from UbuntuPackages, but this did not work either.

I hope you can give me some hints about how to solve this problem. Would be really appreciated.

share|improve this question

1 Answer 1

It seems for me you have some package pinnings.

dpkg way

But either way, just download those packages (libg2c0, gcc-3.4-base, gcc-3.4, cpp-3.4) with wget and install them directly with dpkg. With some command line fu:

PACKAGES=(libg2c0 gcc-3.4 gcc-3.4-base cpp-3.4)
for pkg in $PACKAGES; do wget http://archive.ubuntu.com/ubuntu//pool/universe/g/gcc-3.4/${pkg}_3.4.6-6ubuntu5_$(dpkg --print-architecture).deb; done
sudo dpkg -i ${PACKAGES/%/_3.4.6-6ubuntu5_$(dpkg --print-architecture).deb}

There is no need for the hardy package sources with this method.

APT way

An alternate method with the hardy sources enabled would be to set up some package pinnings in /etc/apt/preferences:

Package: libg2c0 gcc-3.4 gcc-3.4-base cpp-3.4
Pin: release a=hardy*
Pin-Priority: 500

Package: *
Pin: release a=hardy*
Pin-Priority: -1
share|improve this answer

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.