Installed self-compiled Python 3.7.0 as “python”, how to remove it?How do I get the history of “apt-get install” on Ubuntu?How do I get Apache to run Python 2.7 rather than 2.5?dpkg error installing on Ubuntu 10.04ubuntu server: SSH banner telling to update packages but nothing to updateHow to tell apt-get to ignore unmet dependencies forever?bzr not installing against newer python installed on debianInstalling mod_wsgi with python 2.7 on ubuntuUnable to install python2.7-dev due to unmet dependencies Ubuntu 12.04How to create Python (2.7.3) RPM package?How do I ignore unmet dependencies while using apt-get remove?

How to find if SQL server backup is encrypted with TDE without restoring the backup

OP Amp not amplifying audio signal

Why is the sentence "Das ist eine Nase" correct?

How exploitable/balanced is this homebrew spell: Spell Permanency?

How badly should I try to prevent a user from XSSing themselves?

Why are UK visa biometrics appointments suspended at USCIS Application Support Centers?

Placement of More Information/Help Icon button for Radio Buttons

What is required to make GPS signals available indoors?

Unlock My Phone! February 2018

How to install cross-compiler on Ubuntu 18.04?

How do I exit BASH while loop using modulus operator?

Rotate ASCII Art by 45 Degrees

Different meanings of こわい

Do creatures with a listed speed of "0 ft., fly 30 ft. (hover)" ever touch the ground?

How to prevent "they're falling in love" trope

How seriously should I take size and weight limits of hand luggage?

What exactly is ineptocracy?

Are British MPs missing the point, with these 'Indicative Votes'?

What is an equivalently powerful replacement spell for Yuan-Ti's Suggestion spell?

Implication of namely

Where would I need my direct neural interface to be implanted?

What are the G forces leaving Earth orbit?

My ex-girlfriend uses my Apple ID to log in to her iPad. Do I have to give her my Apple ID password to reset it?

Does marriage to a non-Numenorean disqualify a candidate for the crown of Gondor?



Installed self-compiled Python 3.7.0 as “python”, how to remove it?


How do I get the history of “apt-get install” on Ubuntu?How do I get Apache to run Python 2.7 rather than 2.5?dpkg error installing on Ubuntu 10.04ubuntu server: SSH banner telling to update packages but nothing to updateHow to tell apt-get to ignore unmet dependencies forever?bzr not installing against newer python installed on debianInstalling mod_wsgi with python 2.7 on ubuntuUnable to install python2.7-dev due to unmet dependencies Ubuntu 12.04How to create Python (2.7.3) RPM package?How do I ignore unmet dependencies while using apt-get remove?













0















I have made a huge mistake on my Ubuntu 16.04 server.



I compiled and installed Python 3.7.0 from source using make altinstall, but I did not include all of the core dependencies I needed, so I was going to remove it and install a pre-packaged deb instead.



However, to remove it, I used this method with checkinstall. I generated a deb so that I could then remove all of the files created by the original installation, but for the deb's package name, I just left the default python.



Now, I have the following package installed:



$ sudo dpkg -l python
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=====================================================-===============================-===============================-===============================================================================================================
ri python 3.7.0-1 amd64 Package created with checkinstall 1.6.2


This means that I cannot run dpkg -r python because system packages depend on a metapackage just called python:



$ sudo dpkg -r python
dpkg: dependency problems prevent removal of python:
python-ldb depends on python (<< 2.8).
python-ldb depends on python (>= 2.7~).
python-ldb depends on python (<< 2.8).
python-ldb depends on python (>= 2.7~).
python-ldb depends on python (<< 2.8).
python-ldb depends on python (>= 2.7~).
python-talloc depends on python (<< 2.8).
python-talloc depends on python (>= 2.7~).
python-talloc depends on python (<< 2.8).
python-talloc depends on python (>= 2.7~).
python-pyicu depends on python (>= 2.7).
python-pyicu depends on python (<< 2.8).
python-pyicu depends on python (>= 2.7).
python-pyicu depends on python (<< 2.8).
samba-common-bin depends on python.
samba depends on python (>= 2.7).
samba depends on python (<< 2.8).
samba depends on python (>= 2.7).
samba depends on python (<< 2.8).
iotop depends on python (>= 2.7.1-0ubuntu2).
iotop depends on python (<< 2.8).
iotop depends on python (>= 2.7.1-0ubuntu2).
iotop depends on python (<< 2.8).
python-cryptography depends on python (<< 2.8).
py
dpkg: error processing package python (--remove):
dependency problems - not removing
Errors were encountered while processing:
python


And I cannot install the default version of python again because I have the wrong version installed for python:



$ sudo apt install python
Reading package lists... Done
Building dependency tree
Reading state information... Done
python is already the newest version (3.7.0-1).
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
iotop : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-acme : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-asn1crypto : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-certifi : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-cffi-backend : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-chardet : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-configparser : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-crypto : Depends: python (< 2.8) but 3.7.0-1 is to be installed
Depends: python:any (>= 2.7.5-5~)
python-cryptography : Depends: python (< 2.8) but 3.7.0-1 is to be installed
Depends: python:any (>= 2.7.5-5~)
python-dnspython : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-enum34 : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-funcsigs : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-future : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-idna : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-ipaddress : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-josepy : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-ldb : Depends: python (< 2.8) but 3.7.0-1 is to be installed
Depends: python:any (>= 2.7.5-5~)
python-mock : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-openssl : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-parsedatetime : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-pbr : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-pkg-resources : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-pyicu : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-requests : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-requests-toolbelt : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-rfc3339 : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-samba : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-setuptools : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-six : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-talloc : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-tdb : Depends: python (< 2.8) but 3.7.0-1 is to be installed
Depends: python:any (>= 2.7.5-5~)
python-tz : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-urllib3 : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
samba : Depends: python (< 2.8) but 3.7.0-1 is to be installed
Recommends: attr but it is not going to be installed
Recommends: samba-dsdb-modules but it is not going to be installed
Recommends: samba-vfs-modules but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


Running that scares me, so I chose no:



$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
iotop python-acme python-asn1crypto python-certifi python-cffi-backend python-chardet python-configparser python-crypto python-cryptography python-dnspython python-enum34 python-funcsigs python-future python-idna python-ipaddress
python-josepy python-ldb python-mock python-openssl python-parsedatetime python-pbr python-pkg-resources python-pyicu python-requests python-requests-toolbelt python-rfc3339 python-samba python-setuptools python-six python-talloc
python-tdb python-tz python-urllib3 samba samba-common-bin samba-libs
0 upgraded, 0 newly installed, 36 to remove and 0 not upgraded.
After this operation, 56.7 MB disk space will be freed.
Do you want to continue? [Y/n]


Is there any way to recover from this?
Thanks in advance!










share|improve this question







New contributor




Andy Castille is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 3





    sudo apt-get dist-upgrade would be my first choice.

    – Michael Hampton
    yesterday











  • @MichaelHampton Thanks for the suggestion, but it wants to do the same thing as apt-get -f install

    – Andy Castille
    yesterday











  • It wanted to remove exactly the same set of packages? That doesn't make sense. Can you copy and paste the output you saw?

    – Michael Hampton
    yesterday











  • @MichaelHampton Sure thing: pastebin.com/HNvAuGWc

    – Andy Castille
    yesterday











  • That's very different output, and it should also be in your question.

    – Michael Hampton
    yesterday















0















I have made a huge mistake on my Ubuntu 16.04 server.



I compiled and installed Python 3.7.0 from source using make altinstall, but I did not include all of the core dependencies I needed, so I was going to remove it and install a pre-packaged deb instead.



However, to remove it, I used this method with checkinstall. I generated a deb so that I could then remove all of the files created by the original installation, but for the deb's package name, I just left the default python.



Now, I have the following package installed:



$ sudo dpkg -l python
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=====================================================-===============================-===============================-===============================================================================================================
ri python 3.7.0-1 amd64 Package created with checkinstall 1.6.2


This means that I cannot run dpkg -r python because system packages depend on a metapackage just called python:



$ sudo dpkg -r python
dpkg: dependency problems prevent removal of python:
python-ldb depends on python (<< 2.8).
python-ldb depends on python (>= 2.7~).
python-ldb depends on python (<< 2.8).
python-ldb depends on python (>= 2.7~).
python-ldb depends on python (<< 2.8).
python-ldb depends on python (>= 2.7~).
python-talloc depends on python (<< 2.8).
python-talloc depends on python (>= 2.7~).
python-talloc depends on python (<< 2.8).
python-talloc depends on python (>= 2.7~).
python-pyicu depends on python (>= 2.7).
python-pyicu depends on python (<< 2.8).
python-pyicu depends on python (>= 2.7).
python-pyicu depends on python (<< 2.8).
samba-common-bin depends on python.
samba depends on python (>= 2.7).
samba depends on python (<< 2.8).
samba depends on python (>= 2.7).
samba depends on python (<< 2.8).
iotop depends on python (>= 2.7.1-0ubuntu2).
iotop depends on python (<< 2.8).
iotop depends on python (>= 2.7.1-0ubuntu2).
iotop depends on python (<< 2.8).
python-cryptography depends on python (<< 2.8).
py
dpkg: error processing package python (--remove):
dependency problems - not removing
Errors were encountered while processing:
python


And I cannot install the default version of python again because I have the wrong version installed for python:



$ sudo apt install python
Reading package lists... Done
Building dependency tree
Reading state information... Done
python is already the newest version (3.7.0-1).
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
iotop : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-acme : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-asn1crypto : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-certifi : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-cffi-backend : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-chardet : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-configparser : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-crypto : Depends: python (< 2.8) but 3.7.0-1 is to be installed
Depends: python:any (>= 2.7.5-5~)
python-cryptography : Depends: python (< 2.8) but 3.7.0-1 is to be installed
Depends: python:any (>= 2.7.5-5~)
python-dnspython : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-enum34 : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-funcsigs : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-future : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-idna : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-ipaddress : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-josepy : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-ldb : Depends: python (< 2.8) but 3.7.0-1 is to be installed
Depends: python:any (>= 2.7.5-5~)
python-mock : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-openssl : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-parsedatetime : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-pbr : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-pkg-resources : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-pyicu : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-requests : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-requests-toolbelt : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-rfc3339 : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-samba : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-setuptools : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-six : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-talloc : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-tdb : Depends: python (< 2.8) but 3.7.0-1 is to be installed
Depends: python:any (>= 2.7.5-5~)
python-tz : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-urllib3 : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
samba : Depends: python (< 2.8) but 3.7.0-1 is to be installed
Recommends: attr but it is not going to be installed
Recommends: samba-dsdb-modules but it is not going to be installed
Recommends: samba-vfs-modules but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


Running that scares me, so I chose no:



$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
iotop python-acme python-asn1crypto python-certifi python-cffi-backend python-chardet python-configparser python-crypto python-cryptography python-dnspython python-enum34 python-funcsigs python-future python-idna python-ipaddress
python-josepy python-ldb python-mock python-openssl python-parsedatetime python-pbr python-pkg-resources python-pyicu python-requests python-requests-toolbelt python-rfc3339 python-samba python-setuptools python-six python-talloc
python-tdb python-tz python-urllib3 samba samba-common-bin samba-libs
0 upgraded, 0 newly installed, 36 to remove and 0 not upgraded.
After this operation, 56.7 MB disk space will be freed.
Do you want to continue? [Y/n]


Is there any way to recover from this?
Thanks in advance!










share|improve this question







New contributor




Andy Castille is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 3





    sudo apt-get dist-upgrade would be my first choice.

    – Michael Hampton
    yesterday











  • @MichaelHampton Thanks for the suggestion, but it wants to do the same thing as apt-get -f install

    – Andy Castille
    yesterday











  • It wanted to remove exactly the same set of packages? That doesn't make sense. Can you copy and paste the output you saw?

    – Michael Hampton
    yesterday











  • @MichaelHampton Sure thing: pastebin.com/HNvAuGWc

    – Andy Castille
    yesterday











  • That's very different output, and it should also be in your question.

    – Michael Hampton
    yesterday













0












0








0








I have made a huge mistake on my Ubuntu 16.04 server.



I compiled and installed Python 3.7.0 from source using make altinstall, but I did not include all of the core dependencies I needed, so I was going to remove it and install a pre-packaged deb instead.



However, to remove it, I used this method with checkinstall. I generated a deb so that I could then remove all of the files created by the original installation, but for the deb's package name, I just left the default python.



Now, I have the following package installed:



$ sudo dpkg -l python
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=====================================================-===============================-===============================-===============================================================================================================
ri python 3.7.0-1 amd64 Package created with checkinstall 1.6.2


This means that I cannot run dpkg -r python because system packages depend on a metapackage just called python:



$ sudo dpkg -r python
dpkg: dependency problems prevent removal of python:
python-ldb depends on python (<< 2.8).
python-ldb depends on python (>= 2.7~).
python-ldb depends on python (<< 2.8).
python-ldb depends on python (>= 2.7~).
python-ldb depends on python (<< 2.8).
python-ldb depends on python (>= 2.7~).
python-talloc depends on python (<< 2.8).
python-talloc depends on python (>= 2.7~).
python-talloc depends on python (<< 2.8).
python-talloc depends on python (>= 2.7~).
python-pyicu depends on python (>= 2.7).
python-pyicu depends on python (<< 2.8).
python-pyicu depends on python (>= 2.7).
python-pyicu depends on python (<< 2.8).
samba-common-bin depends on python.
samba depends on python (>= 2.7).
samba depends on python (<< 2.8).
samba depends on python (>= 2.7).
samba depends on python (<< 2.8).
iotop depends on python (>= 2.7.1-0ubuntu2).
iotop depends on python (<< 2.8).
iotop depends on python (>= 2.7.1-0ubuntu2).
iotop depends on python (<< 2.8).
python-cryptography depends on python (<< 2.8).
py
dpkg: error processing package python (--remove):
dependency problems - not removing
Errors were encountered while processing:
python


And I cannot install the default version of python again because I have the wrong version installed for python:



$ sudo apt install python
Reading package lists... Done
Building dependency tree
Reading state information... Done
python is already the newest version (3.7.0-1).
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
iotop : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-acme : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-asn1crypto : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-certifi : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-cffi-backend : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-chardet : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-configparser : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-crypto : Depends: python (< 2.8) but 3.7.0-1 is to be installed
Depends: python:any (>= 2.7.5-5~)
python-cryptography : Depends: python (< 2.8) but 3.7.0-1 is to be installed
Depends: python:any (>= 2.7.5-5~)
python-dnspython : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-enum34 : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-funcsigs : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-future : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-idna : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-ipaddress : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-josepy : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-ldb : Depends: python (< 2.8) but 3.7.0-1 is to be installed
Depends: python:any (>= 2.7.5-5~)
python-mock : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-openssl : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-parsedatetime : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-pbr : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-pkg-resources : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-pyicu : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-requests : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-requests-toolbelt : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-rfc3339 : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-samba : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-setuptools : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-six : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-talloc : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-tdb : Depends: python (< 2.8) but 3.7.0-1 is to be installed
Depends: python:any (>= 2.7.5-5~)
python-tz : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-urllib3 : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
samba : Depends: python (< 2.8) but 3.7.0-1 is to be installed
Recommends: attr but it is not going to be installed
Recommends: samba-dsdb-modules but it is not going to be installed
Recommends: samba-vfs-modules but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


Running that scares me, so I chose no:



$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
iotop python-acme python-asn1crypto python-certifi python-cffi-backend python-chardet python-configparser python-crypto python-cryptography python-dnspython python-enum34 python-funcsigs python-future python-idna python-ipaddress
python-josepy python-ldb python-mock python-openssl python-parsedatetime python-pbr python-pkg-resources python-pyicu python-requests python-requests-toolbelt python-rfc3339 python-samba python-setuptools python-six python-talloc
python-tdb python-tz python-urllib3 samba samba-common-bin samba-libs
0 upgraded, 0 newly installed, 36 to remove and 0 not upgraded.
After this operation, 56.7 MB disk space will be freed.
Do you want to continue? [Y/n]


Is there any way to recover from this?
Thanks in advance!










share|improve this question







New contributor




Andy Castille is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












I have made a huge mistake on my Ubuntu 16.04 server.



I compiled and installed Python 3.7.0 from source using make altinstall, but I did not include all of the core dependencies I needed, so I was going to remove it and install a pre-packaged deb instead.



However, to remove it, I used this method with checkinstall. I generated a deb so that I could then remove all of the files created by the original installation, but for the deb's package name, I just left the default python.



Now, I have the following package installed:



$ sudo dpkg -l python
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=====================================================-===============================-===============================-===============================================================================================================
ri python 3.7.0-1 amd64 Package created with checkinstall 1.6.2


This means that I cannot run dpkg -r python because system packages depend on a metapackage just called python:



$ sudo dpkg -r python
dpkg: dependency problems prevent removal of python:
python-ldb depends on python (<< 2.8).
python-ldb depends on python (>= 2.7~).
python-ldb depends on python (<< 2.8).
python-ldb depends on python (>= 2.7~).
python-ldb depends on python (<< 2.8).
python-ldb depends on python (>= 2.7~).
python-talloc depends on python (<< 2.8).
python-talloc depends on python (>= 2.7~).
python-talloc depends on python (<< 2.8).
python-talloc depends on python (>= 2.7~).
python-pyicu depends on python (>= 2.7).
python-pyicu depends on python (<< 2.8).
python-pyicu depends on python (>= 2.7).
python-pyicu depends on python (<< 2.8).
samba-common-bin depends on python.
samba depends on python (>= 2.7).
samba depends on python (<< 2.8).
samba depends on python (>= 2.7).
samba depends on python (<< 2.8).
iotop depends on python (>= 2.7.1-0ubuntu2).
iotop depends on python (<< 2.8).
iotop depends on python (>= 2.7.1-0ubuntu2).
iotop depends on python (<< 2.8).
python-cryptography depends on python (<< 2.8).
py
dpkg: error processing package python (--remove):
dependency problems - not removing
Errors were encountered while processing:
python


And I cannot install the default version of python again because I have the wrong version installed for python:



$ sudo apt install python
Reading package lists... Done
Building dependency tree
Reading state information... Done
python is already the newest version (3.7.0-1).
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
iotop : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-acme : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-asn1crypto : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-certifi : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-cffi-backend : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-chardet : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-configparser : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-crypto : Depends: python (< 2.8) but 3.7.0-1 is to be installed
Depends: python:any (>= 2.7.5-5~)
python-cryptography : Depends: python (< 2.8) but 3.7.0-1 is to be installed
Depends: python:any (>= 2.7.5-5~)
python-dnspython : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-enum34 : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-funcsigs : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-future : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-idna : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-ipaddress : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-josepy : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-ldb : Depends: python (< 2.8) but 3.7.0-1 is to be installed
Depends: python:any (>= 2.7.5-5~)
python-mock : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-openssl : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-parsedatetime : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-pbr : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-pkg-resources : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-pyicu : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-requests : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-requests-toolbelt : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-rfc3339 : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-samba : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-setuptools : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-six : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
python-talloc : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-tdb : Depends: python (< 2.8) but 3.7.0-1 is to be installed
Depends: python:any (>= 2.7.5-5~)
python-tz : Depends: python (< 2.8) but 3.7.0-1 is to be installed
python-urllib3 : Depends: python:any (< 2.8)
Depends: python:any (>= 2.7.5-5~)
samba : Depends: python (< 2.8) but 3.7.0-1 is to be installed
Recommends: attr but it is not going to be installed
Recommends: samba-dsdb-modules but it is not going to be installed
Recommends: samba-vfs-modules but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


Running that scares me, so I chose no:



$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
iotop python-acme python-asn1crypto python-certifi python-cffi-backend python-chardet python-configparser python-crypto python-cryptography python-dnspython python-enum34 python-funcsigs python-future python-idna python-ipaddress
python-josepy python-ldb python-mock python-openssl python-parsedatetime python-pbr python-pkg-resources python-pyicu python-requests python-requests-toolbelt python-rfc3339 python-samba python-setuptools python-six python-talloc
python-tdb python-tz python-urllib3 samba samba-common-bin samba-libs
0 upgraded, 0 newly installed, 36 to remove and 0 not upgraded.
After this operation, 56.7 MB disk space will be freed.
Do you want to continue? [Y/n]


Is there any way to recover from this?
Thanks in advance!







ubuntu python apt dependencies dpkg






share|improve this question







New contributor




Andy Castille is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question







New contributor




Andy Castille is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question






New contributor




Andy Castille is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked yesterday









Andy CastilleAndy Castille

1033




1033




New contributor




Andy Castille is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Andy Castille is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Andy Castille is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







  • 3





    sudo apt-get dist-upgrade would be my first choice.

    – Michael Hampton
    yesterday











  • @MichaelHampton Thanks for the suggestion, but it wants to do the same thing as apt-get -f install

    – Andy Castille
    yesterday











  • It wanted to remove exactly the same set of packages? That doesn't make sense. Can you copy and paste the output you saw?

    – Michael Hampton
    yesterday











  • @MichaelHampton Sure thing: pastebin.com/HNvAuGWc

    – Andy Castille
    yesterday











  • That's very different output, and it should also be in your question.

    – Michael Hampton
    yesterday












  • 3





    sudo apt-get dist-upgrade would be my first choice.

    – Michael Hampton
    yesterday











  • @MichaelHampton Thanks for the suggestion, but it wants to do the same thing as apt-get -f install

    – Andy Castille
    yesterday











  • It wanted to remove exactly the same set of packages? That doesn't make sense. Can you copy and paste the output you saw?

    – Michael Hampton
    yesterday











  • @MichaelHampton Sure thing: pastebin.com/HNvAuGWc

    – Andy Castille
    yesterday











  • That's very different output, and it should also be in your question.

    – Michael Hampton
    yesterday







3




3





sudo apt-get dist-upgrade would be my first choice.

– Michael Hampton
yesterday





sudo apt-get dist-upgrade would be my first choice.

– Michael Hampton
yesterday













@MichaelHampton Thanks for the suggestion, but it wants to do the same thing as apt-get -f install

– Andy Castille
yesterday





@MichaelHampton Thanks for the suggestion, but it wants to do the same thing as apt-get -f install

– Andy Castille
yesterday













It wanted to remove exactly the same set of packages? That doesn't make sense. Can you copy and paste the output you saw?

– Michael Hampton
yesterday





It wanted to remove exactly the same set of packages? That doesn't make sense. Can you copy and paste the output you saw?

– Michael Hampton
yesterday













@MichaelHampton Sure thing: pastebin.com/HNvAuGWc

– Andy Castille
yesterday





@MichaelHampton Sure thing: pastebin.com/HNvAuGWc

– Andy Castille
yesterday













That's very different output, and it should also be in your question.

– Michael Hampton
yesterday





That's very different output, and it should also be in your question.

– Michael Hampton
yesterday










1 Answer
1






active

oldest

votes


















1














Normally an apt-get dist-upgrade will sort this out, by replacing packages with those in the actual apt sources you have enabled, but it doesn't seem to have done so this time on your system.



It looks like you're going to find a way need to reinstall the original Python package.



Fortunately you can do this by specifying the package version you want.



But first you have to figure out what that version is. For that, use apt policy. You should see something similar to this:



error@vmtest-ubuntu1604:~$ sudo apt policy python
python:
Installed: 3.7.0-1
Candidate: 2.7.12-1~16.04
Version table:
*** 2.7.12-1~16.04 500
500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
100 /var/lib/dpkg/status
2.7.11-1 500
500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages


Now that you have its version number, you can install it specifically:



error@vmtest-ubuntu1604:~$ sudo apt install python=2.7.12-1~16.04 


(Don't use -f here, even if prompted.)






share|improve this answer























  • This worked perfectly! Thank you for an easy solution :)

    – Andy Castille
    yesterday











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "2"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);






Andy Castille is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f960880%2finstalled-self-compiled-python-3-7-0-as-python-how-to-remove-it%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









1














Normally an apt-get dist-upgrade will sort this out, by replacing packages with those in the actual apt sources you have enabled, but it doesn't seem to have done so this time on your system.



It looks like you're going to find a way need to reinstall the original Python package.



Fortunately you can do this by specifying the package version you want.



But first you have to figure out what that version is. For that, use apt policy. You should see something similar to this:



error@vmtest-ubuntu1604:~$ sudo apt policy python
python:
Installed: 3.7.0-1
Candidate: 2.7.12-1~16.04
Version table:
*** 2.7.12-1~16.04 500
500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
100 /var/lib/dpkg/status
2.7.11-1 500
500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages


Now that you have its version number, you can install it specifically:



error@vmtest-ubuntu1604:~$ sudo apt install python=2.7.12-1~16.04 


(Don't use -f here, even if prompted.)






share|improve this answer























  • This worked perfectly! Thank you for an easy solution :)

    – Andy Castille
    yesterday















1














Normally an apt-get dist-upgrade will sort this out, by replacing packages with those in the actual apt sources you have enabled, but it doesn't seem to have done so this time on your system.



It looks like you're going to find a way need to reinstall the original Python package.



Fortunately you can do this by specifying the package version you want.



But first you have to figure out what that version is. For that, use apt policy. You should see something similar to this:



error@vmtest-ubuntu1604:~$ sudo apt policy python
python:
Installed: 3.7.0-1
Candidate: 2.7.12-1~16.04
Version table:
*** 2.7.12-1~16.04 500
500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
100 /var/lib/dpkg/status
2.7.11-1 500
500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages


Now that you have its version number, you can install it specifically:



error@vmtest-ubuntu1604:~$ sudo apt install python=2.7.12-1~16.04 


(Don't use -f here, even if prompted.)






share|improve this answer























  • This worked perfectly! Thank you for an easy solution :)

    – Andy Castille
    yesterday













1












1








1







Normally an apt-get dist-upgrade will sort this out, by replacing packages with those in the actual apt sources you have enabled, but it doesn't seem to have done so this time on your system.



It looks like you're going to find a way need to reinstall the original Python package.



Fortunately you can do this by specifying the package version you want.



But first you have to figure out what that version is. For that, use apt policy. You should see something similar to this:



error@vmtest-ubuntu1604:~$ sudo apt policy python
python:
Installed: 3.7.0-1
Candidate: 2.7.12-1~16.04
Version table:
*** 2.7.12-1~16.04 500
500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
100 /var/lib/dpkg/status
2.7.11-1 500
500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages


Now that you have its version number, you can install it specifically:



error@vmtest-ubuntu1604:~$ sudo apt install python=2.7.12-1~16.04 


(Don't use -f here, even if prompted.)






share|improve this answer













Normally an apt-get dist-upgrade will sort this out, by replacing packages with those in the actual apt sources you have enabled, but it doesn't seem to have done so this time on your system.



It looks like you're going to find a way need to reinstall the original Python package.



Fortunately you can do this by specifying the package version you want.



But first you have to figure out what that version is. For that, use apt policy. You should see something similar to this:



error@vmtest-ubuntu1604:~$ sudo apt policy python
python:
Installed: 3.7.0-1
Candidate: 2.7.12-1~16.04
Version table:
*** 2.7.12-1~16.04 500
500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
100 /var/lib/dpkg/status
2.7.11-1 500
500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages


Now that you have its version number, you can install it specifically:



error@vmtest-ubuntu1604:~$ sudo apt install python=2.7.12-1~16.04 


(Don't use -f here, even if prompted.)







share|improve this answer












share|improve this answer



share|improve this answer










answered yesterday









Michael HamptonMichael Hampton

174k27319643




174k27319643












  • This worked perfectly! Thank you for an easy solution :)

    – Andy Castille
    yesterday

















  • This worked perfectly! Thank you for an easy solution :)

    – Andy Castille
    yesterday
















This worked perfectly! Thank you for an easy solution :)

– Andy Castille
yesterday





This worked perfectly! Thank you for an easy solution :)

– Andy Castille
yesterday










Andy Castille is a new contributor. Be nice, and check out our Code of Conduct.









draft saved

draft discarded


















Andy Castille is a new contributor. Be nice, and check out our Code of Conduct.












Andy Castille is a new contributor. Be nice, and check out our Code of Conduct.











Andy Castille is a new contributor. Be nice, and check out our Code of Conduct.














Thanks for contributing an answer to Server Fault!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f960880%2finstalled-self-compiled-python-3-7-0-as-python-how-to-remove-it%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Club Baloncesto Breogán Índice Historia | Pavillón | Nome | O Breogán na cultura popular | Xogadores | Adestradores | Presidentes | Palmarés | Historial | Líderes | Notas | Véxase tamén | Menú de navegacióncbbreogan.galCadroGuía oficial da ACB 2009-10, páxina 201Guía oficial ACB 1992, páxina 183. Editorial DB.É de 6.500 espectadores sentados axeitándose á última normativa"Estudiantes Junior, entre as mellores canteiras"o orixinalHemeroteca El Mundo Deportivo, 16 setembro de 1970, páxina 12Historia do BreogánAlfredo Pérez, o último canoneiroHistoria C.B. BreogánHemeroteca de El Mundo DeportivoJimmy Wright, norteamericano do Breogán deixará Lugo por ameazas de morteResultados de Breogán en 1986-87Resultados de Breogán en 1990-91Ficha de Velimir Perasović en acb.comResultados de Breogán en 1994-95Breogán arrasa al Barça. "El Mundo Deportivo", 27 de setembro de 1999, páxina 58CB Breogán - FC BarcelonaA FEB invita a participar nunha nova Liga EuropeaCharlie Bell na prensa estatalMáximos anotadores 2005Tempada 2005-06 : Tódolos Xogadores da Xornada""Non quero pensar nunha man negra, mais pregúntome que está a pasar""o orixinalRaúl López, orgulloso dos xogadores, presume da boa saúde económica do BreogánJulio González confirma que cesa como presidente del BreogánHomenaxe a Lisardo GómezA tempada do rexurdimento celesteEntrevista a Lisardo GómezEl COB dinamita el Pazo para forzar el quinto (69-73)Cafés Candelas, patrocinador del CB Breogán"Suso Lázare, novo presidente do Breogán"o orixinalCafés Candelas Breogán firma el mayor triunfo de la historiaEl Breogán realizará 17 homenajes por su cincuenta aniversario"O Breogán honra ao seu fundador e primeiro presidente"o orixinalMiguel Giao recibiu a homenaxe do PazoHomenaxe aos primeiros gladiadores celestesO home que nos amosa como ver o Breo co corazónTita Franco será homenaxeada polos #50anosdeBreoJulio Vila recibirá unha homenaxe in memoriam polos #50anosdeBreo"O Breogán homenaxeará aos seus aboados máis veteráns"Pechada ovación a «Capi» Sanmartín e Ricardo «Corazón de González»Homenaxe por décadas de informaciónPaco García volve ao Pazo con motivo do 50 aniversario"Resultados y clasificaciones""O Cafés Candelas Breogán, campión da Copa Princesa""O Cafés Candelas Breogán, equipo ACB"C.B. Breogán"Proxecto social"o orixinal"Centros asociados"o orixinalFicha en imdb.comMario Camus trata la recuperación del amor en 'La vieja música', su última película"Páxina web oficial""Club Baloncesto Breogán""C. B. Breogán S.A.D."eehttp://www.fegaba.com

Vilaño, A Laracha Índice Patrimonio | Lugares e parroquias | Véxase tamén | Menú de navegación43°14′52″N 8°36′03″O / 43.24775, -8.60070

Cegueira Índice Epidemioloxía | Deficiencia visual | Tipos de cegueira | Principais causas de cegueira | Tratamento | Técnicas de adaptación e axudas | Vida dos cegos | Primeiros auxilios | Crenzas respecto das persoas cegas | Crenzas das persoas cegas | O neno deficiente visual | Aspectos psicolóxicos da cegueira | Notas | Véxase tamén | Menú de navegación54.054.154.436928256blindnessDicionario da Real Academia GalegaPortal das Palabras"International Standards: Visual Standards — Aspects and Ranges of Vision Loss with Emphasis on Population Surveys.""Visual impairment and blindness""Presentan un plan para previr a cegueira"o orixinalACCDV Associació Catalana de Cecs i Disminuïts Visuals - PMFTrachoma"Effect of gene therapy on visual function in Leber's congenital amaurosis"1844137110.1056/NEJMoa0802268Cans guía - os mellores amigos dos cegosArquivadoEscola de cans guía para cegos en Mortágua, PortugalArquivado"Tecnología para ciegos y deficientes visuales. Recopilación de recursos gratuitos en la Red""Colorino""‘COL.diesis’, escuchar los sonidos del color""COL.diesis: Transforming Colour into Melody and Implementing the Result in a Colour Sensor Device"o orixinal"Sistema de desarrollo de sinestesia color-sonido para invidentes utilizando un protocolo de audio""Enseñanza táctil - geometría y color. Juegos didácticos para niños ciegos y videntes""Sistema Constanz"L'ocupació laboral dels cecs a l'Estat espanyol està pràcticament equiparada a la de les persones amb visió, entrevista amb Pedro ZuritaONCE (Organización Nacional de Cegos de España)Prevención da cegueiraDescrición de deficiencias visuais (Disc@pnet)Braillín, un boneco atractivo para calquera neno, con ou sen discapacidade, que permite familiarizarse co sistema de escritura e lectura brailleAxudas Técnicas36838ID00897494007150-90057129528256DOID:1432HP:0000618D001766C10.597.751.941.162C97109C0155020