2

I installed 3.6 from source to /opt in Ubuntu 16.04 thinking that I was avoiding startnig any python conflicts this way.

Next time I tried to run apt-get update I ran into an error that says...

You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
...

when I run apt-get -f install I see a warning saying that a lot of stuff is going to be removed...

when I run apt-cache policy python I see this...

python:
  Installed: 3.6.0-1
  Candidate: 3.6.0-1
  Version table:
 *** 3.6.0-1 100
        100 /var/lib/dpkg/status
     2.7.11-1 500
        500 http://mirrors.digitalocean.com/ubuntu xenial/main amd64 Packages

So my questions...

  1. Why would installing from source (to /opt) interfere with dpkg?
  2. How can I get dpkg to forget about my python3.6 install
  3. I don't want to remove a lot of stuff that I need on the system, so other than making dpkg forget about python3, what can I do?
  • How did you install Python 3.6 from source? It seems you somehow ended up installing a python 3.6 package. – Stephen Kitt Jan 25 '17 at 5:30
  • @Stephen Kitt i am not sure actually. it is poosible that I built a deb package at some point but I dont remember. dpkg remove doesnt work so I have no idea how it got there – deltaskelta Jan 25 '17 at 7:23
2
  1. Installing purely from source wouldn't interfere with dpkg, you must have somehow installed a package at some point.

  2. You need to re-install the python package:

    apt-get --reinstall install python=2.7.11-1
    

    This should restore your Python setup and stop asking you to remove lots of packages. You'll probably need to re-install Python 3.6 in /opt, from source without a package.

  3. See above.

0

I suggest you remove python 3.6 you installed then try LinuxBrew It will install python and many other software to your own home directory. It won't conflict with python on your system.

I use LinuxBrew on all my Linux boxes including VMs.

Thanks

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.