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 was trying to install an R package which said it couldn't find -lgortran. So I uninstalled gfortran. However, when I tried to install it again, I got the following error :

gfortran : Depends: gfortran-4.7 (>= 4.7.2-1~) but it is not going to be installed

When I tried installing gfortran-4.7

gfortran-4.7 : Depends: gcc-4.7-base (= 4.7.2-2ubuntu1) but 4.7.2-11precise2 is to be installed

                Depends: gcc-4.7 (= 4.7.2-2ubuntu1) but 4.7.2-11precise2 is to be installed

When I try installing gcc-4.7-base or gcc-4.7, it tells me they're already installed.

What's happening here and how can I fix this?

share|improve this question
try sudo apt-get -f install gfortran-4.7 –  phipsalabim Feb 21 '13 at 1:31
Thanks for the reply. It unfortuantely doesn't work. I get the same error as before. –  Sid Feb 21 '13 at 1:59
the weird thing is that you're running 12.10 but the error msg says that a 12.04 package is to be installed. –  phipsalabim Feb 21 '13 at 2:38
Huh. You're right. Didn't notice that before. Maybe things got messed up when I upgraded? All my sources in sources.list are quantal sources too. Is there any way to reinstall all the packages without a fresh Ubuntu install? If not, should I just reenable precise sources so it can atleast resolve this dependency issue? –  Sid Feb 21 '13 at 3:27
add comment

Your Answer


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

Browse other questions tagged or ask your own question.