Cannot install git on Linux Mint 17.3 - linux

I'm trying to install git for several hours but whatever I do I get this error:
sudo apt-get install git
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:
git : Depends: liberror-perl but it is not installable
E: Unable to correct problems, you have held broken packages.
I've read answers here and I've tried the following without success:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -f
I've tried solution from here:
https://superuser.com/questions/899311/apt-get-error-when-installing-git
I removed everything in /var/lib/apt/lists/* and ran sudo apt-get update
I also tried to install liberror-perl and then the folllowing error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package liberror-perl is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'liberror-perl' has no installation candidate
How could fix this issue with packages? Thanks.
Updated: Now I tried to install another package and I got the same error:
Package 'devscripts' has no installation candidate

Have you tried following the directions in this link?
https://tecadmin.net/install-git-on-ubuntu/
$ sudo add-apt-repository ppa:git-core/ppa
$ sudo apt-get update
$ sudo apt-get install git

Related

How to fix Postgresql-11 installation failed error in Ubuntu

E: Unable to locate package postgres-11
user#ubuntu:~$ pg_ctl start -D /etc/postgres/11/main
The program 'pg_ctl' is currently not installed. You can install it by typing:
sudo apt-get install postgres-xc
user#ubuntu:~$ sudo apt-get install postgres-xc
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:
postgres-xc : Depends: postgres-xc-client but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Unable to install update-notifier-common on Debian Stretch

I'm currently trying to install some fonts on Debian Stretch
g#i-3-nstance:~$ sudo apt-get install ttf-mscorefonts-installer
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:
ttf-mscorefonts-installer : Depends: update-notifier-common (>= 0.119ubuntu2) but it is not installable
E: Unable to correct problems, you have held broken packages.
g#i-3-nstance:~$
...but it seems this package has been removed.
https://github.com/plone/ansible-playbook/issues/98
https://github.com/jnv/ansible-role-unattended-upgrades/issues/6#issuecomment-93569818
Is there a work-around?
Update: I did a manual install based on this: https://askubuntu.com/a/861476
sudo apt-get install cabextract libmspack0
wget http://ftp.de.debian.org/debian/pool/contrib/m/msttcorefonts/ttf-mscorefonts-installer_3.6_all.deb
sudo dpkg -i ttf-mscorefonts-installer_3.6_all.deb
The ttf-mscorefonts-installer package that apt-get tries to install is from Ubuntu repository, not from Debian repository (note that it depends on update-notifier-common >= 0.119ubuntu2).
You probably have mixed Debian and Ubuntu repositories in /etc/apt/sources.list.

"Broken packages" do not let me install packages

I'm having some problems trying to setup a mjpg-streamer in my raspberry pi running raspbian. When I was trying to install the package, the following error was appearing:
sudo apt-get install libjpeg-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libjpeg8-dev' instead of 'libjpeg-dev'
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:
libjpeg8-dev : Depends: libjpeg8 (= 8d-1+deb7u1) but 8d1-2 is to be installed
E: Unable to correct problems, you have held broken packages.
I've looked a lot of suggestions on google, and tried things like apt-get update and dpkg --get-selections | grep hold (nothing shows up). I really tried a lot of stuff, with no luck.
Do anyone have any suggestion on what to do?
Thanks everyone
As been said, it is a dependency problem, to solve it you can use aptitude.
To install aptitude:
sudo apt-get install aptitude
To use aptitude:
sudo aptitude install package_name-normaly_dev

Cannot install g++ on ubuntu 14.04.4 LTS (I have tried commands and software center)

I cannot install g++ on newly installed ubuntu 14.04.4 LTS.
When I use command sudo apt-get install g++, the terminal tell me:
cluster#cluster0-vm:~$ sudo apt-get install g++
[sudo] password for cluster:
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:
g++ : Depends: g++-4.8 (>= 4.8.2-5~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I changed the source, and tried again, failed too.
cluster#cluster0-vm:~$ sudo apt-get install g++
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:
g++:i386 : Depends: cpp:i386 (>= 4:4.7.3-1ubuntu10) but it is not going to be installed
Depends: gcc:i386 (>= 4:4.7.3-1ubuntu10) but it is not going to be installed
Depends: g++-4.7:i386 (>= 4.7.3-1~) but it is not going to be installed
Depends: gcc-4.7:i386 (>= 4.7.3-1~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I used the ubuntu software center to install g++, failed again......
Figure: Use ubuntu software center to install g++
This problem has been solved by changing another source.
I have tried 4 sources, and all of them have problems......OMG!
I think this will help:
sudo apt-get update
sudo apt-get -f install
sudo dpkg --configure -a
sudo apt-get clean
sudo apt-get install g++
Also this could help:
sudo dpkg --purge g++# Try this first
sudo dpkg --purge --force-depends g++# Try this ONLY if the previous line fails
sudo apt-get clean g++# Remove g++ from the cache
sudo apt-get install g++# Download and install the appropriate version of g++
If I had to guess, I would say there are other libc6, libc-dev, etc..files that need updating before you can update the C's and G's.
It seems that if you install build essentials then it will correct the problem.
If you look up the files on the ubuntu packages site and look at the dependencies, then compare them to what is on your machine, I bet you find you have an update conflict due to incompatible dependency version somewhere.
You could manually download them individually at the bottom of the repository page (a small table) then double click the deb files and they will start to install if all of the dependencies and versions are met and compatible.
Think of it as "A depends on B which depends on C which depends on D......" being installed. to some infinity no avail. Its a nightmare when doing it that way. But does force you to respect Synaptic and the apt-get thorough and detailed process and compatibility check.
Best to start with build essentials though.

UBUNTU 14.04 64BIT can not install lib32stdc++6

I want install a 32bit application,but i can not install lib32stdc++6
here is:
sudo apt-get install lib32stdc++6
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:
lib32stdc++6 : Depends: gcc-4.8-base (= 4.8.2-19ubuntu1) but 4.8.4-2ubuntu1~14.04 is to be installed
E: Unable to correct problems, you have held broken packages.
finally,i found this
https://askubuntu.com/questions/223237/unable-to-correct-problems-you-have-held-broken-packages
and i use aptitude to force install this
sudo aptitude -f install lib32stdc++6
run this command ,and choose 'n',then it will give you another choice,then choose 'Y'.
done and success

Resources