Cannot install gfortran on Ubuntu 16.04 despite a myriad of attempted solutions












0















I tried to install gfortran on Ubuntu 16.04.3 with sudo apt install gfortran but I got the following error message:



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: gfortran :
Depends: gfortran-5 (>= 5.3.1-3~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.


I have tried apt, aptitude, cleaning, updating, upgrading and fixing potential broken dependencies all to no avail. I was hoping to diagnose this problem another way.










share|improve this question

























  • What Ubuntu release are you using? A quick scan of packages.ubuntu.com/… makes it look like it's available. You also have broken packages - so did you try the suggested solution? (sudo apt -f install) You should fix prior problems before you try and add new packages. You haven't pasted to your question the real error you need to fix though so we can't help with that.

    – guiverc
    Jan 26 at 9:08













  • Im using Ubuntu 16.04.3 LTS. I did try sudo apt - f install aswell prior to trying to install fortran.

    – Dean P
    Jan 26 at 9:38








  • 2





    Ubuntu 16.04.4 came out in March 1, 2018 - so you're Ubuntu hasn't been full-upgraded since at least then. Your first priority should be to bring your system up-to-date by fixing your held broken packages, and installing security updates (and I'd suggest taking note of problems & error messages rather than just letting your system stop upgrading)

    – guiverc
    Jan 26 at 9:49













  • Ill update the system and see if it works. I thought by doing a apt-get upgrade actually upgrades the system.

    – Dean P
    Jan 26 at 10:02











  • fyi: apt-get upgrade does upgrade within certain restrictions. Many changes however get 'skipped' to ensure no reboot /stability/.. is attained. The man page states "dist-upgrade in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages" and doesn't leave packages un-upgraded/skipped

    – guiverc
    Jan 26 at 10:06


















0















I tried to install gfortran on Ubuntu 16.04.3 with sudo apt install gfortran but I got the following error message:



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: gfortran :
Depends: gfortran-5 (>= 5.3.1-3~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.


I have tried apt, aptitude, cleaning, updating, upgrading and fixing potential broken dependencies all to no avail. I was hoping to diagnose this problem another way.










share|improve this question

























  • What Ubuntu release are you using? A quick scan of packages.ubuntu.com/… makes it look like it's available. You also have broken packages - so did you try the suggested solution? (sudo apt -f install) You should fix prior problems before you try and add new packages. You haven't pasted to your question the real error you need to fix though so we can't help with that.

    – guiverc
    Jan 26 at 9:08













  • Im using Ubuntu 16.04.3 LTS. I did try sudo apt - f install aswell prior to trying to install fortran.

    – Dean P
    Jan 26 at 9:38








  • 2





    Ubuntu 16.04.4 came out in March 1, 2018 - so you're Ubuntu hasn't been full-upgraded since at least then. Your first priority should be to bring your system up-to-date by fixing your held broken packages, and installing security updates (and I'd suggest taking note of problems & error messages rather than just letting your system stop upgrading)

    – guiverc
    Jan 26 at 9:49













  • Ill update the system and see if it works. I thought by doing a apt-get upgrade actually upgrades the system.

    – Dean P
    Jan 26 at 10:02











  • fyi: apt-get upgrade does upgrade within certain restrictions. Many changes however get 'skipped' to ensure no reboot /stability/.. is attained. The man page states "dist-upgrade in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages" and doesn't leave packages un-upgraded/skipped

    – guiverc
    Jan 26 at 10:06
















0












0








0








I tried to install gfortran on Ubuntu 16.04.3 with sudo apt install gfortran but I got the following error message:



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: gfortran :
Depends: gfortran-5 (>= 5.3.1-3~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.


I have tried apt, aptitude, cleaning, updating, upgrading and fixing potential broken dependencies all to no avail. I was hoping to diagnose this problem another way.










share|improve this question
















I tried to install gfortran on Ubuntu 16.04.3 with sudo apt install gfortran but I got the following error message:



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: gfortran :
Depends: gfortran-5 (>= 5.3.1-3~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.


I have tried apt, aptitude, cleaning, updating, upgrading and fixing potential broken dependencies all to no avail. I was hoping to diagnose this problem another way.







16.04 package-management software-installation dependencies






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jan 26 at 10:02









karel

59.8k13129151




59.8k13129151










asked Jan 26 at 9:02









Dean PDean P

31




31













  • What Ubuntu release are you using? A quick scan of packages.ubuntu.com/… makes it look like it's available. You also have broken packages - so did you try the suggested solution? (sudo apt -f install) You should fix prior problems before you try and add new packages. You haven't pasted to your question the real error you need to fix though so we can't help with that.

    – guiverc
    Jan 26 at 9:08













  • Im using Ubuntu 16.04.3 LTS. I did try sudo apt - f install aswell prior to trying to install fortran.

    – Dean P
    Jan 26 at 9:38








  • 2





    Ubuntu 16.04.4 came out in March 1, 2018 - so you're Ubuntu hasn't been full-upgraded since at least then. Your first priority should be to bring your system up-to-date by fixing your held broken packages, and installing security updates (and I'd suggest taking note of problems & error messages rather than just letting your system stop upgrading)

    – guiverc
    Jan 26 at 9:49













  • Ill update the system and see if it works. I thought by doing a apt-get upgrade actually upgrades the system.

    – Dean P
    Jan 26 at 10:02











  • fyi: apt-get upgrade does upgrade within certain restrictions. Many changes however get 'skipped' to ensure no reboot /stability/.. is attained. The man page states "dist-upgrade in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages" and doesn't leave packages un-upgraded/skipped

    – guiverc
    Jan 26 at 10:06





















  • What Ubuntu release are you using? A quick scan of packages.ubuntu.com/… makes it look like it's available. You also have broken packages - so did you try the suggested solution? (sudo apt -f install) You should fix prior problems before you try and add new packages. You haven't pasted to your question the real error you need to fix though so we can't help with that.

    – guiverc
    Jan 26 at 9:08













  • Im using Ubuntu 16.04.3 LTS. I did try sudo apt - f install aswell prior to trying to install fortran.

    – Dean P
    Jan 26 at 9:38








  • 2





    Ubuntu 16.04.4 came out in March 1, 2018 - so you're Ubuntu hasn't been full-upgraded since at least then. Your first priority should be to bring your system up-to-date by fixing your held broken packages, and installing security updates (and I'd suggest taking note of problems & error messages rather than just letting your system stop upgrading)

    – guiverc
    Jan 26 at 9:49













  • Ill update the system and see if it works. I thought by doing a apt-get upgrade actually upgrades the system.

    – Dean P
    Jan 26 at 10:02











  • fyi: apt-get upgrade does upgrade within certain restrictions. Many changes however get 'skipped' to ensure no reboot /stability/.. is attained. The man page states "dist-upgrade in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages" and doesn't leave packages un-upgraded/skipped

    – guiverc
    Jan 26 at 10:06



















What Ubuntu release are you using? A quick scan of packages.ubuntu.com/… makes it look like it's available. You also have broken packages - so did you try the suggested solution? (sudo apt -f install) You should fix prior problems before you try and add new packages. You haven't pasted to your question the real error you need to fix though so we can't help with that.

– guiverc
Jan 26 at 9:08







What Ubuntu release are you using? A quick scan of packages.ubuntu.com/… makes it look like it's available. You also have broken packages - so did you try the suggested solution? (sudo apt -f install) You should fix prior problems before you try and add new packages. You haven't pasted to your question the real error you need to fix though so we can't help with that.

– guiverc
Jan 26 at 9:08















Im using Ubuntu 16.04.3 LTS. I did try sudo apt - f install aswell prior to trying to install fortran.

– Dean P
Jan 26 at 9:38







Im using Ubuntu 16.04.3 LTS. I did try sudo apt - f install aswell prior to trying to install fortran.

– Dean P
Jan 26 at 9:38






2




2





Ubuntu 16.04.4 came out in March 1, 2018 - so you're Ubuntu hasn't been full-upgraded since at least then. Your first priority should be to bring your system up-to-date by fixing your held broken packages, and installing security updates (and I'd suggest taking note of problems & error messages rather than just letting your system stop upgrading)

– guiverc
Jan 26 at 9:49







Ubuntu 16.04.4 came out in March 1, 2018 - so you're Ubuntu hasn't been full-upgraded since at least then. Your first priority should be to bring your system up-to-date by fixing your held broken packages, and installing security updates (and I'd suggest taking note of problems & error messages rather than just letting your system stop upgrading)

– guiverc
Jan 26 at 9:49















Ill update the system and see if it works. I thought by doing a apt-get upgrade actually upgrades the system.

– Dean P
Jan 26 at 10:02





Ill update the system and see if it works. I thought by doing a apt-get upgrade actually upgrades the system.

– Dean P
Jan 26 at 10:02













fyi: apt-get upgrade does upgrade within certain restrictions. Many changes however get 'skipped' to ensure no reboot /stability/.. is attained. The man page states "dist-upgrade in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages" and doesn't leave packages un-upgraded/skipped

– guiverc
Jan 26 at 10:06







fyi: apt-get upgrade does upgrade within certain restrictions. Many changes however get 'skipped' to ensure no reboot /stability/.. is attained. The man page states "dist-upgrade in addition to performing the function of upgrade, also intelligently handles changing dependencies with new versions of packages" and doesn't leave packages un-upgraded/skipped

– guiverc
Jan 26 at 10:06












1 Answer
1






active

oldest

votes


















1














Your Ubuntu 16.04.3 hasn't been updated in a long time, so you should do a software update before trying to fix the broken packages.



sudo apt update  
sudo apt upgrade


Select the Fix Broken Packages option in Synaptic package manager. It's a GUI solution to the broken packages error message that's easy to do.



Run the following command to install Synaptic.



sudo apt update  
sudo apt install synaptic


Open Synaptic and in Synaptic select Edit -> Fix Broken Packages and then repeat Edit -> Fix Broken Packages a second time.



Another easy fix is to install an older version of gfortran from the default Ubuntu 16.04 repositories instead of the gfortran package which is currently version 5.3.1. Open the terminal and type:



sudo apt update  
sudo apt install gfortran-4.8





share|improve this answer


























  • Synaptic didnt work but installing gfortran-4.8 did work. I see the reason why the latest gfortran doesn't install is because as @guiverc pointed out, my system is out of date

    – Dean P
    Jan 26 at 10:00













Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1113009%2fcannot-install-gfortran-on-ubuntu-16-04-despite-a-myriad-of-attempted-solutions%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














Your Ubuntu 16.04.3 hasn't been updated in a long time, so you should do a software update before trying to fix the broken packages.



sudo apt update  
sudo apt upgrade


Select the Fix Broken Packages option in Synaptic package manager. It's a GUI solution to the broken packages error message that's easy to do.



Run the following command to install Synaptic.



sudo apt update  
sudo apt install synaptic


Open Synaptic and in Synaptic select Edit -> Fix Broken Packages and then repeat Edit -> Fix Broken Packages a second time.



Another easy fix is to install an older version of gfortran from the default Ubuntu 16.04 repositories instead of the gfortran package which is currently version 5.3.1. Open the terminal and type:



sudo apt update  
sudo apt install gfortran-4.8





share|improve this answer


























  • Synaptic didnt work but installing gfortran-4.8 did work. I see the reason why the latest gfortran doesn't install is because as @guiverc pointed out, my system is out of date

    – Dean P
    Jan 26 at 10:00


















1














Your Ubuntu 16.04.3 hasn't been updated in a long time, so you should do a software update before trying to fix the broken packages.



sudo apt update  
sudo apt upgrade


Select the Fix Broken Packages option in Synaptic package manager. It's a GUI solution to the broken packages error message that's easy to do.



Run the following command to install Synaptic.



sudo apt update  
sudo apt install synaptic


Open Synaptic and in Synaptic select Edit -> Fix Broken Packages and then repeat Edit -> Fix Broken Packages a second time.



Another easy fix is to install an older version of gfortran from the default Ubuntu 16.04 repositories instead of the gfortran package which is currently version 5.3.1. Open the terminal and type:



sudo apt update  
sudo apt install gfortran-4.8





share|improve this answer


























  • Synaptic didnt work but installing gfortran-4.8 did work. I see the reason why the latest gfortran doesn't install is because as @guiverc pointed out, my system is out of date

    – Dean P
    Jan 26 at 10:00
















1












1








1







Your Ubuntu 16.04.3 hasn't been updated in a long time, so you should do a software update before trying to fix the broken packages.



sudo apt update  
sudo apt upgrade


Select the Fix Broken Packages option in Synaptic package manager. It's a GUI solution to the broken packages error message that's easy to do.



Run the following command to install Synaptic.



sudo apt update  
sudo apt install synaptic


Open Synaptic and in Synaptic select Edit -> Fix Broken Packages and then repeat Edit -> Fix Broken Packages a second time.



Another easy fix is to install an older version of gfortran from the default Ubuntu 16.04 repositories instead of the gfortran package which is currently version 5.3.1. Open the terminal and type:



sudo apt update  
sudo apt install gfortran-4.8





share|improve this answer















Your Ubuntu 16.04.3 hasn't been updated in a long time, so you should do a software update before trying to fix the broken packages.



sudo apt update  
sudo apt upgrade


Select the Fix Broken Packages option in Synaptic package manager. It's a GUI solution to the broken packages error message that's easy to do.



Run the following command to install Synaptic.



sudo apt update  
sudo apt install synaptic


Open Synaptic and in Synaptic select Edit -> Fix Broken Packages and then repeat Edit -> Fix Broken Packages a second time.



Another easy fix is to install an older version of gfortran from the default Ubuntu 16.04 repositories instead of the gfortran package which is currently version 5.3.1. Open the terminal and type:



sudo apt update  
sudo apt install gfortran-4.8






share|improve this answer














share|improve this answer



share|improve this answer








edited Jan 26 at 10:01

























answered Jan 26 at 9:27









karelkarel

59.8k13129151




59.8k13129151













  • Synaptic didnt work but installing gfortran-4.8 did work. I see the reason why the latest gfortran doesn't install is because as @guiverc pointed out, my system is out of date

    – Dean P
    Jan 26 at 10:00





















  • Synaptic didnt work but installing gfortran-4.8 did work. I see the reason why the latest gfortran doesn't install is because as @guiverc pointed out, my system is out of date

    – Dean P
    Jan 26 at 10:00



















Synaptic didnt work but installing gfortran-4.8 did work. I see the reason why the latest gfortran doesn't install is because as @guiverc pointed out, my system is out of date

– Dean P
Jan 26 at 10:00







Synaptic didnt work but installing gfortran-4.8 did work. I see the reason why the latest gfortran doesn't install is because as @guiverc pointed out, my system is out of date

– Dean P
Jan 26 at 10:00




















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1113009%2fcannot-install-gfortran-on-ubuntu-16-04-despite-a-myriad-of-attempted-solutions%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Human spaceflight

Can not write log (Is /dev/pts mounted?) - openpty in Ubuntu-on-Windows?

張江高科駅