Can't install gcc [duplicate]












0
















This question already has an answer here:




  • Unable to correct problems, you have held broken packages

    7 answers




I am trying to install gcc (in order to install postGIS later), but i have the folowing problem (you can see in the picture). Can anyone help?



See terminal










share|improve this question















marked as duplicate by Emmet, Kulfy, karel, Eric Carvalho, pomsky Mar 18 at 6:17


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.



















  • Please avoid upload terminal screenshot, instead copy the output to the post.

    – Emmet
    Mar 16 at 12:08











  • run and post output from apt-cache policy gcc gcc-7

    – doug
    Mar 16 at 12:10











  • gcc-7 7.3.0-12 looks more like a Debian package than an Ubuntu one - have you added any non-Ubuntu repositories to your apt sources?

    – steeldriver
    Mar 16 at 12:10











  • @doug gcc: Installed: (none) Candidate: 4:7.3.0-3ubuntu2 Version table: 4:7.3.0-3ubuntu2 500 500 archive.ubuntu.com/ubuntu bionic/main amd64 Packages gcc-7: Installed: (none) Candidate: 7.3.0-16ubuntu3 Version table: 7.3.0-16ubuntu3 500 500 archive.ubuntu.com/ubuntu bionic/main amd64 Packages

    – Laura A. Agalioti
    Mar 16 at 12:12











  • Run sudo apt update before install, to update the package repository.

    – Soren A
    Mar 16 at 12:14
















0
















This question already has an answer here:




  • Unable to correct problems, you have held broken packages

    7 answers




I am trying to install gcc (in order to install postGIS later), but i have the folowing problem (you can see in the picture). Can anyone help?



See terminal










share|improve this question















marked as duplicate by Emmet, Kulfy, karel, Eric Carvalho, pomsky Mar 18 at 6:17


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.



















  • Please avoid upload terminal screenshot, instead copy the output to the post.

    – Emmet
    Mar 16 at 12:08











  • run and post output from apt-cache policy gcc gcc-7

    – doug
    Mar 16 at 12:10











  • gcc-7 7.3.0-12 looks more like a Debian package than an Ubuntu one - have you added any non-Ubuntu repositories to your apt sources?

    – steeldriver
    Mar 16 at 12:10











  • @doug gcc: Installed: (none) Candidate: 4:7.3.0-3ubuntu2 Version table: 4:7.3.0-3ubuntu2 500 500 archive.ubuntu.com/ubuntu bionic/main amd64 Packages gcc-7: Installed: (none) Candidate: 7.3.0-16ubuntu3 Version table: 7.3.0-16ubuntu3 500 500 archive.ubuntu.com/ubuntu bionic/main amd64 Packages

    – Laura A. Agalioti
    Mar 16 at 12:12











  • Run sudo apt update before install, to update the package repository.

    – Soren A
    Mar 16 at 12:14














0












0








0









This question already has an answer here:




  • Unable to correct problems, you have held broken packages

    7 answers




I am trying to install gcc (in order to install postGIS later), but i have the folowing problem (you can see in the picture). Can anyone help?



See terminal










share|improve this question

















This question already has an answer here:




  • Unable to correct problems, you have held broken packages

    7 answers




I am trying to install gcc (in order to install postGIS later), but i have the folowing problem (you can see in the picture). Can anyone help?



See terminal





This question already has an answer here:




  • Unable to correct problems, you have held broken packages

    7 answers








18.04 gcc






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Mar 16 at 12:06









Emmet

7,23322345




7,23322345










asked Mar 16 at 12:00









Laura A. AgaliotiLaura A. Agalioti

31




31




marked as duplicate by Emmet, Kulfy, karel, Eric Carvalho, pomsky Mar 18 at 6:17


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









marked as duplicate by Emmet, Kulfy, karel, Eric Carvalho, pomsky Mar 18 at 6:17


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.















  • Please avoid upload terminal screenshot, instead copy the output to the post.

    – Emmet
    Mar 16 at 12:08











  • run and post output from apt-cache policy gcc gcc-7

    – doug
    Mar 16 at 12:10











  • gcc-7 7.3.0-12 looks more like a Debian package than an Ubuntu one - have you added any non-Ubuntu repositories to your apt sources?

    – steeldriver
    Mar 16 at 12:10











  • @doug gcc: Installed: (none) Candidate: 4:7.3.0-3ubuntu2 Version table: 4:7.3.0-3ubuntu2 500 500 archive.ubuntu.com/ubuntu bionic/main amd64 Packages gcc-7: Installed: (none) Candidate: 7.3.0-16ubuntu3 Version table: 7.3.0-16ubuntu3 500 500 archive.ubuntu.com/ubuntu bionic/main amd64 Packages

    – Laura A. Agalioti
    Mar 16 at 12:12











  • Run sudo apt update before install, to update the package repository.

    – Soren A
    Mar 16 at 12:14



















  • Please avoid upload terminal screenshot, instead copy the output to the post.

    – Emmet
    Mar 16 at 12:08











  • run and post output from apt-cache policy gcc gcc-7

    – doug
    Mar 16 at 12:10











  • gcc-7 7.3.0-12 looks more like a Debian package than an Ubuntu one - have you added any non-Ubuntu repositories to your apt sources?

    – steeldriver
    Mar 16 at 12:10











  • @doug gcc: Installed: (none) Candidate: 4:7.3.0-3ubuntu2 Version table: 4:7.3.0-3ubuntu2 500 500 archive.ubuntu.com/ubuntu bionic/main amd64 Packages gcc-7: Installed: (none) Candidate: 7.3.0-16ubuntu3 Version table: 7.3.0-16ubuntu3 500 500 archive.ubuntu.com/ubuntu bionic/main amd64 Packages

    – Laura A. Agalioti
    Mar 16 at 12:12











  • Run sudo apt update before install, to update the package repository.

    – Soren A
    Mar 16 at 12:14

















Please avoid upload terminal screenshot, instead copy the output to the post.

– Emmet
Mar 16 at 12:08





Please avoid upload terminal screenshot, instead copy the output to the post.

– Emmet
Mar 16 at 12:08













run and post output from apt-cache policy gcc gcc-7

– doug
Mar 16 at 12:10





run and post output from apt-cache policy gcc gcc-7

– doug
Mar 16 at 12:10













gcc-7 7.3.0-12 looks more like a Debian package than an Ubuntu one - have you added any non-Ubuntu repositories to your apt sources?

– steeldriver
Mar 16 at 12:10





gcc-7 7.3.0-12 looks more like a Debian package than an Ubuntu one - have you added any non-Ubuntu repositories to your apt sources?

– steeldriver
Mar 16 at 12:10













@doug gcc: Installed: (none) Candidate: 4:7.3.0-3ubuntu2 Version table: 4:7.3.0-3ubuntu2 500 500 archive.ubuntu.com/ubuntu bionic/main amd64 Packages gcc-7: Installed: (none) Candidate: 7.3.0-16ubuntu3 Version table: 7.3.0-16ubuntu3 500 500 archive.ubuntu.com/ubuntu bionic/main amd64 Packages

– Laura A. Agalioti
Mar 16 at 12:12





@doug gcc: Installed: (none) Candidate: 4:7.3.0-3ubuntu2 Version table: 4:7.3.0-3ubuntu2 500 500 archive.ubuntu.com/ubuntu bionic/main amd64 Packages gcc-7: Installed: (none) Candidate: 7.3.0-16ubuntu3 Version table: 7.3.0-16ubuntu3 500 500 archive.ubuntu.com/ubuntu bionic/main amd64 Packages

– Laura A. Agalioti
Mar 16 at 12:12













Run sudo apt update before install, to update the package repository.

– Soren A
Mar 16 at 12:14





Run sudo apt update before install, to update the package repository.

– Soren A
Mar 16 at 12:14










1 Answer
1






active

oldest

votes


















1














You can get a list of actually held packages with:



dpkg --get-selections | grep hold



If there are none, or none look related, then it's probably something else. You can also try using the aptitude rather than apt-get to install your package:



sudo aptitude install <packagename>



Aptitude will try and find solutions which involve modifying other packages. It will also give you a detailed explanation of the problem and options for fixing it.



If you try Aptitude with -f, it will change its priorities and then you will obtain only those solutions which require removing/downgrading fewer packages. Here's the command:



sudo aptitude -f install <packagename>



Note: Assuming dpkg --get-selections | grep hold is empty, Aptitude is your best solution to resolve held packages.



Source URL: Unable to correct problems, you have held broken packages






share|improve this answer
























  • Thanks! I installed Aptitude and then i did sudo aptitude install <packagename>. Aptitude helped me to find solutions

    – Laura A. Agalioti
    Mar 16 at 13:12











  • Happy to help @LauraA.Agalioti.

    – Manu Mathur
    Mar 16 at 13:16


















1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














You can get a list of actually held packages with:



dpkg --get-selections | grep hold



If there are none, or none look related, then it's probably something else. You can also try using the aptitude rather than apt-get to install your package:



sudo aptitude install <packagename>



Aptitude will try and find solutions which involve modifying other packages. It will also give you a detailed explanation of the problem and options for fixing it.



If you try Aptitude with -f, it will change its priorities and then you will obtain only those solutions which require removing/downgrading fewer packages. Here's the command:



sudo aptitude -f install <packagename>



Note: Assuming dpkg --get-selections | grep hold is empty, Aptitude is your best solution to resolve held packages.



Source URL: Unable to correct problems, you have held broken packages






share|improve this answer
























  • Thanks! I installed Aptitude and then i did sudo aptitude install <packagename>. Aptitude helped me to find solutions

    – Laura A. Agalioti
    Mar 16 at 13:12











  • Happy to help @LauraA.Agalioti.

    – Manu Mathur
    Mar 16 at 13:16
















1














You can get a list of actually held packages with:



dpkg --get-selections | grep hold



If there are none, or none look related, then it's probably something else. You can also try using the aptitude rather than apt-get to install your package:



sudo aptitude install <packagename>



Aptitude will try and find solutions which involve modifying other packages. It will also give you a detailed explanation of the problem and options for fixing it.



If you try Aptitude with -f, it will change its priorities and then you will obtain only those solutions which require removing/downgrading fewer packages. Here's the command:



sudo aptitude -f install <packagename>



Note: Assuming dpkg --get-selections | grep hold is empty, Aptitude is your best solution to resolve held packages.



Source URL: Unable to correct problems, you have held broken packages






share|improve this answer
























  • Thanks! I installed Aptitude and then i did sudo aptitude install <packagename>. Aptitude helped me to find solutions

    – Laura A. Agalioti
    Mar 16 at 13:12











  • Happy to help @LauraA.Agalioti.

    – Manu Mathur
    Mar 16 at 13:16














1












1








1







You can get a list of actually held packages with:



dpkg --get-selections | grep hold



If there are none, or none look related, then it's probably something else. You can also try using the aptitude rather than apt-get to install your package:



sudo aptitude install <packagename>



Aptitude will try and find solutions which involve modifying other packages. It will also give you a detailed explanation of the problem and options for fixing it.



If you try Aptitude with -f, it will change its priorities and then you will obtain only those solutions which require removing/downgrading fewer packages. Here's the command:



sudo aptitude -f install <packagename>



Note: Assuming dpkg --get-selections | grep hold is empty, Aptitude is your best solution to resolve held packages.



Source URL: Unable to correct problems, you have held broken packages






share|improve this answer













You can get a list of actually held packages with:



dpkg --get-selections | grep hold



If there are none, or none look related, then it's probably something else. You can also try using the aptitude rather than apt-get to install your package:



sudo aptitude install <packagename>



Aptitude will try and find solutions which involve modifying other packages. It will also give you a detailed explanation of the problem and options for fixing it.



If you try Aptitude with -f, it will change its priorities and then you will obtain only those solutions which require removing/downgrading fewer packages. Here's the command:



sudo aptitude -f install <packagename>



Note: Assuming dpkg --get-selections | grep hold is empty, Aptitude is your best solution to resolve held packages.



Source URL: Unable to correct problems, you have held broken packages







share|improve this answer












share|improve this answer



share|improve this answer










answered Mar 16 at 12:12









Manu MathurManu Mathur

54129




54129













  • Thanks! I installed Aptitude and then i did sudo aptitude install <packagename>. Aptitude helped me to find solutions

    – Laura A. Agalioti
    Mar 16 at 13:12











  • Happy to help @LauraA.Agalioti.

    – Manu Mathur
    Mar 16 at 13:16



















  • Thanks! I installed Aptitude and then i did sudo aptitude install <packagename>. Aptitude helped me to find solutions

    – Laura A. Agalioti
    Mar 16 at 13:12











  • Happy to help @LauraA.Agalioti.

    – Manu Mathur
    Mar 16 at 13:16

















Thanks! I installed Aptitude and then i did sudo aptitude install <packagename>. Aptitude helped me to find solutions

– Laura A. Agalioti
Mar 16 at 13:12





Thanks! I installed Aptitude and then i did sudo aptitude install <packagename>. Aptitude helped me to find solutions

– Laura A. Agalioti
Mar 16 at 13:12













Happy to help @LauraA.Agalioti.

– Manu Mathur
Mar 16 at 13:16





Happy to help @LauraA.Agalioti.

– Manu Mathur
Mar 16 at 13:16



Popular posts from this blog

Category:香港粉麵

List *all* the tuples!

Channel [V]