Was trying to install Pip through the command
I was getting the following error message.
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
.....
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
Also as stated in the terminal tried using the command
sudo apt-get -f install
Which gave this in return
Correcting dependencies... failed.
The following packages have unmet dependencies:
.....
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
As Suggested in some threads I tried using sudo apt-get install --fix-broken && sudo apt-get autoremove && sudo apt-get update && sudo apt-get install samba
but didnt work. I also tried removing the individual package but this failed as well.
I have both python 2.7 as well 3.5.1 installed.
My python -V
returns Python 2.7.6
.
My python3 -V
returns Python 3.5.1
.
My apt-cache policy python python3
returns
python:
Installed: 3.5.1-1
Candidate: 3.5.1-1
Version table:
*** 3.5.1-1 0
100 /var/lib/dpkg/status
python3:
Installed: 3.4.0-0ubuntu2
Candidate: 3.4.0-0ubuntu2
Version table:
*** 3.4.0-0ubuntu2 0
100 /var/lib/dpkg/status
After using sudo rm -rf /var/lib/apt/lists/* ; sudo apt-get update ; sudo add-apt-repository main; apt-cache policy python
python:
Installed: 3.5.1-1
Candidate: 3.5.1-1
Version table:
*** 3.5.1-1 0
100 /var/lib/dpkg/status
2.7.5-5ubuntu3 0
500 http://archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
Thanks in advance
python -V ; python3 -V ; apt-cache policy python python3
. Make sure you edit your question to provide it, because comments don't preserve formatting. Thanks!apt-cache policy python
and remove some lines? Please runsudo add-apt-repository main && sudo apt-get update && apt-cache policy python
and add the output to your question again. The packagepython
must provide a Python version 2.7, not 3.5. I wonder why you don't see any installation candidates except the cached one.hive.ubuntu.com trusty Release: The following signatures were invalid: BADSIG 16126D3A3E5C1192 Ubuntu Extras Archive Automatic Signing Key <[email protected]> W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty/Release W: Some index files failed to download. They have been ignored, or old ones used instead. python: Installed: 3.5.1-1 Candidate: 3.5.1-1 Version table: *** 3.5.1-1 0 100 /var/lib/dpkg/status
sudo rm -rf /var/lib/apt/lists/* ; sudo apt-get update ; sudo add-apt-repository main
. Any errors? What output doesapt-cache policy python
give you now? (And still: edit your question. Comments have ugly formatting)python
package to the required 2.7.5-5 usingsudo apt-get install python=2.7.5-5ubuntu3
. Please run that andsudo apt-get clean
andsudo apt-get upgrade
and finally try your original commands again afterwards. Tell me if it worked and I'll convert these comments into an answer.