gfortran instalation

Asked by prav on 2013-03-07

when i am trying to install gfortran there is some problem
the message i am getting is
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you ro

Thanks

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu firefox Edit question
Assignee:
No assignee Edit question
Solved by:
Manfred Hampl
Solved:
2013-03-08
Last query:
2013-03-08
Last reply:
2013-03-08

 Please make sure to close all open programs, including all package managers like Synaptic, Update Manager, Software Center, Add/remove programs, etc ...

Then retry installing gfortran.

The error message "E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)" means that another package manager is already in use.....

If that does not help, please follow this procedure:

https://help.ubuntu.com/community/PackageManagerTroubleshootingProcedure

Please send output here:

https://answers.launchpad.net/ubuntu/+source/firefox/+question/223634

Best Manfred Hampl (m-hampl) said : #2

Another possible explanation for the
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/)...
error message is that you try installing programs with the restricted rights of a normal user. To do system modifications like (de-)installing programs you have to temporarily enable administrative rights.
On Ubuntu this is done with the sudo command.
The correct command for installing gfortran would be:
sudo apt-get install gfortran

prav (pravenbr) said : #3

when i am upgrading my ubuntu 10.10 to latest version the following message is coming.
Failed to fetch
Fetching the upgrade failed. There may be a network problem.

what if i continue with the present version instead of newer version? is that going to be bad?

please help ASAP

Manfred Hampl (m-hampl) said : #4

If there are problems when installing packages or trying to upgrade, you best perform a full troubleshooting.

Please follow the instrcustions in step 1 to 6 of https://help.ubuntu.com/community/PackageManagerTroubleshootingProcedure with the only exception that in step 6 you should not open a new question document, but continue in this current one.

If you wish, you can continue using an older Ubuntu version, but you will not get any support any more when that release reaches end of life status. If updating does not work you will not receive any error corrections and security fixes. So it is advisable to stay on a supported Ubuntu release and to regularly install updates. The package manager troubleshooting procedure will try to correct problem with the update system, or will at least indicate causes for problems.