1

I can't install the package. I tried it with the command 'sudo apt-get install python-pip python-dev build-essential' and I got the output:

Reading package lists... Done Building dependency tree
Reading state information... Done build-essential is already the newest version (12.1ubuntu2). build-essential set to manually installed. python-dev is already the newest version (2.7.11-1). python-dev set to manually installed. 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: python-pip : Depends: ca-certificates but it is not going to be installed Depends: python-pip-whl (= 8.1.1-2ubuntu0.4) but it is not going to be installed E: Unable to correct problems, you have held broken packages.

I also tried to install with aptitude, then I got

The following NEW packages will be installed: ca-certificates{a} libpython-all-dev{a} openssl{ab} python-all{a} python-all-dev{a} python-pip python-pip-whl{a} python-wheel{a} 0 packages upgraded, 8 newly installed, 0 to remove and 3 not upgraded. Need to get 1,988 kB of archives. After unpacking 3,537 kB will be used. The following packages have unmet dependencies: openssl : Depends: libssl1.0.0 (>= 1.0.2g) but 1.0.2d-1 is installed. The following actions will resolve these dependencies:

 Keep the following packages at their current version:

1) ca-certificates [Not Installed]
2) openssl [Not Installed]
3) python-pip [Not Installed]
4) python-pip-whl [Not Installed]

Accept this solution? [Y/n/q/?]

I typed Y, then I got

No packages will be installed, upgraded, or removed. 0 packages upgraded, 0 newly installed, 0 to remove and 3 not upgraded. Need to get 0 B of archives. After unpacking 0 B will be used.

I referred the following links if it would work but didn't work

Ubuntu 14.04, problem when install gstreamer1.0-libav, unmet dependencies

How do I resolve unmet dependencies after adding a PPA?

Ubuntu unable to install any packages, held broken packages

Sorry I don't know what I did but looks like I really messed up. But I was able to directly install packages such as numpy, etc directly via apt-get

user41965
  • 333
  • 1
  • 3
  • 15
  • Apt-get build-dep Or you might just try a apt-get -f install, say "no" to upgrade them, I'm guessing they modified minor details and your still holding the outdated version, current to your pc, use apt-get autoremove to let linux choose what is no longer needed for the system –  Mar 12 '17 at 01:22
  • @hellomoto Thank you, I tried but it's not working – user41965 Mar 12 '17 at 01:26
  • @hellomoto I've tried sudo dpkg --configure -a, if I try --reconfigure, it's saying: dpkg: error: unknown option --reconfigure – user41965 Mar 12 '17 at 01:31
  • dpkg --configure -a will configure all unpacked but unconfigured packages. whereas dpkg-reconfigure -phigh -a will reconfigure all installed packages that use debconf with high priority, sorry .... try man dpkg-reconfigure for more info –  Mar 12 '17 at 01:36
  • sudo apt-get build-dep python-pip failed ? After an apt-get update and the configure for dpkg –  Mar 12 '17 at 01:39
  • @hellomoto yes it failed, sorry for the late reply – user41965 Mar 12 '17 at 02:31

2 Answers2

2

You broke your system by unwisely installing software from a non-Ubuntu source.

Lots of good clues in the error message:

openssl : Depends: libssl1.0.0 (>= 1.0.2g) but 1.0.2d-1 is installed

libssl1.0.0 1.0.2g is in the Ubuntu 16.04 repositories.

libssl1.0.0 1.0.2d-1 is not in Ubuntu (nor Debian). You installed it from somewhere else.

To fix the problem, disable the non-Ubuntu source. Then uninstall ALL packages from that source. Refresh your package database (sudo apt update) because your sources have changed. Test your package manager for proper function (sudo apt upgrade). Then re-install the packages you need from the Ubuntu repositories.

user535733
  • 62,253
  • Thank you for answering. Actually I can't find the "other software" application for some reason, and ubuntu software center also doesn't seem to be working. Can you please tell me how to remove the sources and uninstall the packages.And is there a way to know what all packages are being unistalled? Thank you – user41965 Mar 12 '17 at 01:15
  • 1
    That's a different question, answered many times in AskUbuntu. Start by using the apt cache command to determine the source of your lousy libssl package. – user535733 Mar 12 '17 at 01:20
  • I'm sorry if this is silly, but can't we just install libssl1.0.0 (>= 1.0.2g) if it is required? If it's possible in any way – user41965 Mar 12 '17 at 01:29
  • 1
    Go right ahead and try. It usually won't hurt to try. Maybe it will work. Usually it doesn't, and the reason will be explained in the error message. But that's a different question, too. – user535733 Mar 12 '17 at 01:51
  • He's meaning use apt-cache pkgnames |less and apt-cache show –  Mar 12 '17 at 01:57
  • user535733 and @hellomoto thank you very much to both of you. I used the command 'sudo apt-get install libssl1.0.0/xenial libssl-dev/xenial openssl/xenial' it seems to have fixed the problem, I was able to install pip. Thank you once again. Is this correct way or will I face any problems? Because as of now was able to install pip – user41965 Mar 12 '17 at 02:43
  • @user41965 the future is always uncertain. You minimize your risk by keeping notes and staying close to stock Ubuntu. When you run into trouble, use those notes to revert your changes back to stock Ubuntu. – user535733 Mar 12 '17 at 06:25
  • @user535733 ok, thank you. what do you mean by keeping notes? – user41965 Mar 12 '17 at 09:11
  • 1
    @user41965 example: Nov 10 - Today I upgraded Foo 1.1 to 1.2 using instructions at http:/some_blog.org. What you did, why, and where to refer back to when you encounter problems. Most people won't remember those important details in a few weeks. – user535733 Mar 12 '17 at 14:47
  • @user535733 oh, thanks :), I get it. I think I too did something like install sparky desktop and before that too I would always get to partial upgrade, I did something but don't know what happened. You're right. – user41965 Mar 15 '17 at 16:01
  • Oh, dear. 'Partial upgrades' can be very bad news, and are usually caused by some non-Ubuntu sources and PPAs. Down that path lies a full reinstall. Maybe not today, maybe not this month, but inevitable. Keep good, regular backups against that day. – user535733 Mar 15 '17 at 18:02
0

As pointed out by user535733 libssl1.0.0 seems to be missing, therefore by installing it with command:

sudo apt-get install libssl1.0.0/xenial libssl-dev/xenial openssl/xenial

seems to have solved the problem

user41965
  • 333
  • 1
  • 3
  • 15