Beginner problems: update not workingError when trying sudo apt-get update - Python related?“Can't cd to /var/cache/flashplugin-installer” error when I try to install FlashUbuntu 13.10 won't update. apt update and apt upgrade failProblem installing apache2Unable to install nginx on ubuntu 16.04pip install gives “Command ”python setup.py egg_info“ failed with error code 1”dpkg: error processing package sendmail-baseDependency errors for python3 and many others when I run sudo apt-get upgradeFix packages with missing files

Could the barycenter orbit of our sun be greatly underestimated?

How can I open or identify this lamp?

How does the bypass air provide thrust?

Is paying for portrait photos good for the people in the community you're photographing?

Why using adjective after noun?

What kind of electrical connector is this and how do I remove it?

Does the sterile cockpit rule mean flight attendants could not inform the pilots that a passenger is in the lav while on final?

Is Kirk’s comment about “LDS” intended to be a religious joke?

Could a German insult Hitler without being arrested?

Using "those" in comparison structures

I've never seen this before. Is this primarily a "rote computational trick" for multiplication by 9 ...?

Does the geothermal activity influence the climate in Iceland?

Why is the superlative of "nah" not "am nähsten" but "am nächsten"?

Any reason not to use global lambdas?

Is harmlessly appearing to be a school bus driver a crime?

Unexpected large rent payments, by moneygram, for my apartment, not by me

Is it appropriate to rewrite and republish another author's useful but very badly written paper?

Six letter words from "MONSTER"

Partial Relaxation

Is it principled to tip less if a pricey restaurant doesn't accept Visa or Mastercard?

How can I get 2 characters to bond while standing alternate watches?

Can you wield a a typical shield and Aegis of the Raven Queen at the same time?

How can I force a bank to close my account with them?

"Sack" data structure in C#



Beginner problems: update not working


Error when trying sudo apt-get update - Python related?“Can't cd to /var/cache/flashplugin-installer” error when I try to install FlashUbuntu 13.10 won't update. apt update and apt upgrade failProblem installing apache2Unable to install nginx on ubuntu 16.04pip install gives “Command ”python setup.py egg_info“ failed with error code 1”dpkg: error processing package sendmail-baseDependency errors for python3 and many others when I run sudo apt-get upgradeFix packages with missing files






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









0


















When I run sudo apt update I get the following error:



sh: 1: /usr/lib/cnf-update-db: not found
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi'
E: Sub-process returned an error code


I believe the problem might be connected to Python. After running sudo apt-get install -f, the following messages appear:



Reading package lists... Done
Building dependency tree
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 19 not to upgrade.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up python3-wheel (0.30.0-0.2) ...
/var/lib/dpkg/info/python3-wheel.postinst: 6: /var/lib/dpkg/info/python3-wheel.postinst: py3compile: not found
dpkg: error processing package python3-wheel (--configure):
installed python3-wheel package post-installation script subprocess returned error exit status 127
Setting up python3-pip (9.0.1-2.3~ubuntu1.18.04.1) ...
/var/lib/dpkg/info/python3-pip.postinst: 6: /var/lib/dpkg/info/python3-pip.postinst: py3compile: not found
dpkg: error processing package python3-pip (--configure):
installed python3-pip package post-installation script subprocess returned error exit status 127
Setting up python3-setuptools (39.0.1-2) ...
/var/lib/dpkg/info/python3-setuptools.postinst: 6: /var/lib/dpkg/info/python3-setuptools.postinst: py3compile: not found
dpkg: error processing package python3-setuptools (--configure):
installed python3-setuptools package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
python3-wheel
python3-pip
python3-setuptools
E: Sub-process /usr/bin/dpkg returned an error code (1)


As I'm quite new to Linux, can anyone help me out with fixing this problem?



After running sudo apt install --reinstall python3-minimal the problem seems to have disappeared and everything seems to be working fine now (even Terminal is back). In any case, here is the result of python -v: Python 2.7.15+










share|improve this question






















  • 2





    Did you do something to your system's Python installation?

    – Organic Marble
    Oct 1 at 15:23











  • Please edit your question and add output of python -V command.

    – Pilot6
    Oct 1 at 17:13











  • I was trying to install Jupyter Notebook on my laptop and had some issues with Python. I've now found after rebooting my laptop that I can no longer access the gnome terminal, and have to have recourse to Xterm.

    – Greg the Minor
    Oct 1 at 22:59











  • Possible duplicate of Error when trying sudo apt-get update - Python related?

    – Organic Marble
    Oct 2 at 0:13

















0


















When I run sudo apt update I get the following error:



sh: 1: /usr/lib/cnf-update-db: not found
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi'
E: Sub-process returned an error code


I believe the problem might be connected to Python. After running sudo apt-get install -f, the following messages appear:



Reading package lists... Done
Building dependency tree
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 19 not to upgrade.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up python3-wheel (0.30.0-0.2) ...
/var/lib/dpkg/info/python3-wheel.postinst: 6: /var/lib/dpkg/info/python3-wheel.postinst: py3compile: not found
dpkg: error processing package python3-wheel (--configure):
installed python3-wheel package post-installation script subprocess returned error exit status 127
Setting up python3-pip (9.0.1-2.3~ubuntu1.18.04.1) ...
/var/lib/dpkg/info/python3-pip.postinst: 6: /var/lib/dpkg/info/python3-pip.postinst: py3compile: not found
dpkg: error processing package python3-pip (--configure):
installed python3-pip package post-installation script subprocess returned error exit status 127
Setting up python3-setuptools (39.0.1-2) ...
/var/lib/dpkg/info/python3-setuptools.postinst: 6: /var/lib/dpkg/info/python3-setuptools.postinst: py3compile: not found
dpkg: error processing package python3-setuptools (--configure):
installed python3-setuptools package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
python3-wheel
python3-pip
python3-setuptools
E: Sub-process /usr/bin/dpkg returned an error code (1)


As I'm quite new to Linux, can anyone help me out with fixing this problem?



After running sudo apt install --reinstall python3-minimal the problem seems to have disappeared and everything seems to be working fine now (even Terminal is back). In any case, here is the result of python -v: Python 2.7.15+










share|improve this question






















  • 2





    Did you do something to your system's Python installation?

    – Organic Marble
    Oct 1 at 15:23











  • Please edit your question and add output of python -V command.

    – Pilot6
    Oct 1 at 17:13











  • I was trying to install Jupyter Notebook on my laptop and had some issues with Python. I've now found after rebooting my laptop that I can no longer access the gnome terminal, and have to have recourse to Xterm.

    – Greg the Minor
    Oct 1 at 22:59











  • Possible duplicate of Error when trying sudo apt-get update - Python related?

    – Organic Marble
    Oct 2 at 0:13













0













0









0








When I run sudo apt update I get the following error:



sh: 1: /usr/lib/cnf-update-db: not found
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi'
E: Sub-process returned an error code


I believe the problem might be connected to Python. After running sudo apt-get install -f, the following messages appear:



Reading package lists... Done
Building dependency tree
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 19 not to upgrade.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up python3-wheel (0.30.0-0.2) ...
/var/lib/dpkg/info/python3-wheel.postinst: 6: /var/lib/dpkg/info/python3-wheel.postinst: py3compile: not found
dpkg: error processing package python3-wheel (--configure):
installed python3-wheel package post-installation script subprocess returned error exit status 127
Setting up python3-pip (9.0.1-2.3~ubuntu1.18.04.1) ...
/var/lib/dpkg/info/python3-pip.postinst: 6: /var/lib/dpkg/info/python3-pip.postinst: py3compile: not found
dpkg: error processing package python3-pip (--configure):
installed python3-pip package post-installation script subprocess returned error exit status 127
Setting up python3-setuptools (39.0.1-2) ...
/var/lib/dpkg/info/python3-setuptools.postinst: 6: /var/lib/dpkg/info/python3-setuptools.postinst: py3compile: not found
dpkg: error processing package python3-setuptools (--configure):
installed python3-setuptools package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
python3-wheel
python3-pip
python3-setuptools
E: Sub-process /usr/bin/dpkg returned an error code (1)


As I'm quite new to Linux, can anyone help me out with fixing this problem?



After running sudo apt install --reinstall python3-minimal the problem seems to have disappeared and everything seems to be working fine now (even Terminal is back). In any case, here is the result of python -v: Python 2.7.15+










share|improve this question
















When I run sudo apt update I get the following error:



sh: 1: /usr/lib/cnf-update-db: not found
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi'
E: Sub-process returned an error code


I believe the problem might be connected to Python. After running sudo apt-get install -f, the following messages appear:



Reading package lists... Done
Building dependency tree
Reading state information... Done
0 to upgrade, 0 to newly install, 0 to remove and 19 not to upgrade.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up python3-wheel (0.30.0-0.2) ...
/var/lib/dpkg/info/python3-wheel.postinst: 6: /var/lib/dpkg/info/python3-wheel.postinst: py3compile: not found
dpkg: error processing package python3-wheel (--configure):
installed python3-wheel package post-installation script subprocess returned error exit status 127
Setting up python3-pip (9.0.1-2.3~ubuntu1.18.04.1) ...
/var/lib/dpkg/info/python3-pip.postinst: 6: /var/lib/dpkg/info/python3-pip.postinst: py3compile: not found
dpkg: error processing package python3-pip (--configure):
installed python3-pip package post-installation script subprocess returned error exit status 127
Setting up python3-setuptools (39.0.1-2) ...
/var/lib/dpkg/info/python3-setuptools.postinst: 6: /var/lib/dpkg/info/python3-setuptools.postinst: py3compile: not found
dpkg: error processing package python3-setuptools (--configure):
installed python3-setuptools package post-installation script subprocess returned error exit status 127
Errors were encountered while processing:
python3-wheel
python3-pip
python3-setuptools
E: Sub-process /usr/bin/dpkg returned an error code (1)


As I'm quite new to Linux, can anyone help me out with fixing this problem?



After running sudo apt install --reinstall python3-minimal the problem seems to have disappeared and everything seems to be working fine now (even Terminal is back). In any case, here is the result of python -v: Python 2.7.15+







apt python






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 1 at 23:52







Greg the Minor

















asked Oct 1 at 14:58









Greg the MinorGreg the Minor

11 bronze badge




11 bronze badge










  • 2





    Did you do something to your system's Python installation?

    – Organic Marble
    Oct 1 at 15:23











  • Please edit your question and add output of python -V command.

    – Pilot6
    Oct 1 at 17:13











  • I was trying to install Jupyter Notebook on my laptop and had some issues with Python. I've now found after rebooting my laptop that I can no longer access the gnome terminal, and have to have recourse to Xterm.

    – Greg the Minor
    Oct 1 at 22:59











  • Possible duplicate of Error when trying sudo apt-get update - Python related?

    – Organic Marble
    Oct 2 at 0:13












  • 2





    Did you do something to your system's Python installation?

    – Organic Marble
    Oct 1 at 15:23











  • Please edit your question and add output of python -V command.

    – Pilot6
    Oct 1 at 17:13











  • I was trying to install Jupyter Notebook on my laptop and had some issues with Python. I've now found after rebooting my laptop that I can no longer access the gnome terminal, and have to have recourse to Xterm.

    – Greg the Minor
    Oct 1 at 22:59











  • Possible duplicate of Error when trying sudo apt-get update - Python related?

    – Organic Marble
    Oct 2 at 0:13







2




2





Did you do something to your system's Python installation?

– Organic Marble
Oct 1 at 15:23





Did you do something to your system's Python installation?

– Organic Marble
Oct 1 at 15:23













Please edit your question and add output of python -V command.

– Pilot6
Oct 1 at 17:13





Please edit your question and add output of python -V command.

– Pilot6
Oct 1 at 17:13













I was trying to install Jupyter Notebook on my laptop and had some issues with Python. I've now found after rebooting my laptop that I can no longer access the gnome terminal, and have to have recourse to Xterm.

– Greg the Minor
Oct 1 at 22:59





I was trying to install Jupyter Notebook on my laptop and had some issues with Python. I've now found after rebooting my laptop that I can no longer access the gnome terminal, and have to have recourse to Xterm.

– Greg the Minor
Oct 1 at 22:59













Possible duplicate of Error when trying sudo apt-get update - Python related?

– Organic Marble
Oct 2 at 0:13





Possible duplicate of Error when trying sudo apt-get update - Python related?

– Organic Marble
Oct 2 at 0:13










1 Answer
1






active

oldest

votes


















0



















This exact question with the same error was asked a year ago. The solution is to create a symlink to python to fix the issue:



So check where the link /usr/bin/python is pointing to:



$ ls -la /usr/bin/python
lrwxrwxrwx 1 root root 9 Jan 24 2017 /usr/bin/python -> python2.7
It should point to python2, not to any python3 executable. If it points to python3 then do the following (man ln):

$ sudo rm -f /usr/bin/python
$ sudo ln -s /usr/bin/python2.7 /usr/bin/python


After that, the apt-get/apt will start to work again.



Error when trying sudo apt-get update - Python related?
Error in the post shows:



sh 1: /usr/lib/cnf-update-db: not found
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Succes 'if /usr/bin/test -w /var/lib/command-not-found -a -e /usr/lib/cnf-update-db > /dev/null; fi'
E: Sub-process returned an error code





share|improve this answer






















  • 2





    If a question is exactly the same, it should be closed as a duplicate.

    – Organic Marble
    Oct 2 at 0:14












Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
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/4.0/"u003ecc by-sa 4.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
);



);














draft saved

draft discarded
















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1177933%2fbeginner-problems-update-not-working%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









0



















This exact question with the same error was asked a year ago. The solution is to create a symlink to python to fix the issue:



So check where the link /usr/bin/python is pointing to:



$ ls -la /usr/bin/python
lrwxrwxrwx 1 root root 9 Jan 24 2017 /usr/bin/python -> python2.7
It should point to python2, not to any python3 executable. If it points to python3 then do the following (man ln):

$ sudo rm -f /usr/bin/python
$ sudo ln -s /usr/bin/python2.7 /usr/bin/python


After that, the apt-get/apt will start to work again.



Error when trying sudo apt-get update - Python related?
Error in the post shows:



sh 1: /usr/lib/cnf-update-db: not found
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Succes 'if /usr/bin/test -w /var/lib/command-not-found -a -e /usr/lib/cnf-update-db > /dev/null; fi'
E: Sub-process returned an error code





share|improve this answer






















  • 2





    If a question is exactly the same, it should be closed as a duplicate.

    – Organic Marble
    Oct 2 at 0:14















0



















This exact question with the same error was asked a year ago. The solution is to create a symlink to python to fix the issue:



So check where the link /usr/bin/python is pointing to:



$ ls -la /usr/bin/python
lrwxrwxrwx 1 root root 9 Jan 24 2017 /usr/bin/python -> python2.7
It should point to python2, not to any python3 executable. If it points to python3 then do the following (man ln):

$ sudo rm -f /usr/bin/python
$ sudo ln -s /usr/bin/python2.7 /usr/bin/python


After that, the apt-get/apt will start to work again.



Error when trying sudo apt-get update - Python related?
Error in the post shows:



sh 1: /usr/lib/cnf-update-db: not found
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Succes 'if /usr/bin/test -w /var/lib/command-not-found -a -e /usr/lib/cnf-update-db > /dev/null; fi'
E: Sub-process returned an error code





share|improve this answer






















  • 2





    If a question is exactly the same, it should be closed as a duplicate.

    – Organic Marble
    Oct 2 at 0:14













0















0











0









This exact question with the same error was asked a year ago. The solution is to create a symlink to python to fix the issue:



So check where the link /usr/bin/python is pointing to:



$ ls -la /usr/bin/python
lrwxrwxrwx 1 root root 9 Jan 24 2017 /usr/bin/python -> python2.7
It should point to python2, not to any python3 executable. If it points to python3 then do the following (man ln):

$ sudo rm -f /usr/bin/python
$ sudo ln -s /usr/bin/python2.7 /usr/bin/python


After that, the apt-get/apt will start to work again.



Error when trying sudo apt-get update - Python related?
Error in the post shows:



sh 1: /usr/lib/cnf-update-db: not found
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Succes 'if /usr/bin/test -w /var/lib/command-not-found -a -e /usr/lib/cnf-update-db > /dev/null; fi'
E: Sub-process returned an error code





share|improve this answer
















This exact question with the same error was asked a year ago. The solution is to create a symlink to python to fix the issue:



So check where the link /usr/bin/python is pointing to:



$ ls -la /usr/bin/python
lrwxrwxrwx 1 root root 9 Jan 24 2017 /usr/bin/python -> python2.7
It should point to python2, not to any python3 executable. If it points to python3 then do the following (man ln):

$ sudo rm -f /usr/bin/python
$ sudo ln -s /usr/bin/python2.7 /usr/bin/python


After that, the apt-get/apt will start to work again.



Error when trying sudo apt-get update - Python related?
Error in the post shows:



sh 1: /usr/lib/cnf-update-db: not found
Reading package lists... Done
E: Problem executing scripts APT::Update::Post-Invoke-Succes 'if /usr/bin/test -w /var/lib/command-not-found -a -e /usr/lib/cnf-update-db > /dev/null; fi'
E: Sub-process returned an error code






share|improve this answer















share|improve this answer




share|improve this answer








edited Oct 2 at 0:14

























answered Oct 2 at 0:12









LinuxSurfaceNutLinuxSurfaceNut

564 bronze badges




564 bronze badges










  • 2





    If a question is exactly the same, it should be closed as a duplicate.

    – Organic Marble
    Oct 2 at 0:14












  • 2





    If a question is exactly the same, it should be closed as a duplicate.

    – Organic Marble
    Oct 2 at 0:14







2




2





If a question is exactly the same, it should be closed as a duplicate.

– Organic Marble
Oct 2 at 0:14





If a question is exactly the same, it should be closed as a duplicate.

– Organic Marble
Oct 2 at 0:14


















draft saved

draft discarded















































Thanks for contributing an answer to Ask Ubuntu!


  • 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%2faskubuntu.com%2fquestions%2f1177933%2fbeginner-problems-update-not-working%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

Tamil (spriik) Luke uk diar | Nawigatjuun

Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

Training a classifier when some of the features are unknownWhy does Gradient Boosting regression predict negative values when there are no negative y-values in my training set?How to improve an existing (trained) classifier?What is effect when I set up some self defined predisctor variables?Why Matlab neural network classification returns decimal values on prediction dataset?Fitting and transforming text data in training, testing, and validation setsHow to quantify the performance of the classifier (multi-class SVM) using the test data?How do I control for some patients providing multiple samples in my training data?Training and Test setTraining a convolutional neural network for image denoising in MatlabShouldn't an autoencoder with #(neurons in hidden layer) = #(neurons in input layer) be “perfect”?