apt-get upgrade reports error in Ubuntu MATE 16.04












2














I am using Ubuntu MATE 16.04. I think I had some broken packages which caused apt-get upgrade to return the following error:



Do you want to continue? [Y/n] y
(Reading database ... 386704 files and directories currently installed.)
Removing nvidia-prime (0.8.2) ...
/var/lib/dpkg/info/nvidia-prime.postrm: 79: /var/lib/dpkg/info/nvidia-prime.postrm: lsb_release: not found
dpkg: error processing package nvidia-prime (--remove):
subprocess installed post-removal script returned error exit status 127
Errors were encountered while processing:
nvidia-prime
E: Sub-process /usr/bin/dpkg returned an error code (1)


Any help would be appreciated.










share|improve this question
























  • Does apt-cache policy lsb-release report that lsb-release package is intstalled?
    – karel
    Dec 20 '18 at 8:42










  • lsb-release: Installed: (none) Candidate: (none) Version table: 9.20160110ubuntu0.2 0 100 /var/lib/dpkg/status
    – abbasi_ahsan
    Dec 20 '18 at 8:43










  • You need to enable the standard software sources for your Ubuntu version in /etc/apt/sources.list to install lsb-release, What version of Ubuntu are you using?
    – karel
    Dec 20 '18 at 8:47












  • unfortunately the "software sources" is missing. I am on ubuntu 16.04 : 4.4.0-140-generic. How can i enable lsb-release from the terminal ?
    – abbasi_ahsan
    Dec 20 '18 at 8:50










  • i had opened the /etc/apt/sources.list, but its empty !
    – abbasi_ahsan
    Dec 20 '18 at 8:51
















2














I am using Ubuntu MATE 16.04. I think I had some broken packages which caused apt-get upgrade to return the following error:



Do you want to continue? [Y/n] y
(Reading database ... 386704 files and directories currently installed.)
Removing nvidia-prime (0.8.2) ...
/var/lib/dpkg/info/nvidia-prime.postrm: 79: /var/lib/dpkg/info/nvidia-prime.postrm: lsb_release: not found
dpkg: error processing package nvidia-prime (--remove):
subprocess installed post-removal script returned error exit status 127
Errors were encountered while processing:
nvidia-prime
E: Sub-process /usr/bin/dpkg returned an error code (1)


Any help would be appreciated.










share|improve this question
























  • Does apt-cache policy lsb-release report that lsb-release package is intstalled?
    – karel
    Dec 20 '18 at 8:42










  • lsb-release: Installed: (none) Candidate: (none) Version table: 9.20160110ubuntu0.2 0 100 /var/lib/dpkg/status
    – abbasi_ahsan
    Dec 20 '18 at 8:43










  • You need to enable the standard software sources for your Ubuntu version in /etc/apt/sources.list to install lsb-release, What version of Ubuntu are you using?
    – karel
    Dec 20 '18 at 8:47












  • unfortunately the "software sources" is missing. I am on ubuntu 16.04 : 4.4.0-140-generic. How can i enable lsb-release from the terminal ?
    – abbasi_ahsan
    Dec 20 '18 at 8:50










  • i had opened the /etc/apt/sources.list, but its empty !
    – abbasi_ahsan
    Dec 20 '18 at 8:51














2












2








2







I am using Ubuntu MATE 16.04. I think I had some broken packages which caused apt-get upgrade to return the following error:



Do you want to continue? [Y/n] y
(Reading database ... 386704 files and directories currently installed.)
Removing nvidia-prime (0.8.2) ...
/var/lib/dpkg/info/nvidia-prime.postrm: 79: /var/lib/dpkg/info/nvidia-prime.postrm: lsb_release: not found
dpkg: error processing package nvidia-prime (--remove):
subprocess installed post-removal script returned error exit status 127
Errors were encountered while processing:
nvidia-prime
E: Sub-process /usr/bin/dpkg returned an error code (1)


Any help would be appreciated.










share|improve this question















I am using Ubuntu MATE 16.04. I think I had some broken packages which caused apt-get upgrade to return the following error:



Do you want to continue? [Y/n] y
(Reading database ... 386704 files and directories currently installed.)
Removing nvidia-prime (0.8.2) ...
/var/lib/dpkg/info/nvidia-prime.postrm: 79: /var/lib/dpkg/info/nvidia-prime.postrm: lsb_release: not found
dpkg: error processing package nvidia-prime (--remove):
subprocess installed post-removal script returned error exit status 127
Errors were encountered while processing:
nvidia-prime
E: Sub-process /usr/bin/dpkg returned an error code (1)


Any help would be appreciated.







apt package-management upgrade mate lsb-release






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 20 '18 at 10:54

























asked Dec 20 '18 at 8:28









abbasi_ahsan

154




154












  • Does apt-cache policy lsb-release report that lsb-release package is intstalled?
    – karel
    Dec 20 '18 at 8:42










  • lsb-release: Installed: (none) Candidate: (none) Version table: 9.20160110ubuntu0.2 0 100 /var/lib/dpkg/status
    – abbasi_ahsan
    Dec 20 '18 at 8:43










  • You need to enable the standard software sources for your Ubuntu version in /etc/apt/sources.list to install lsb-release, What version of Ubuntu are you using?
    – karel
    Dec 20 '18 at 8:47












  • unfortunately the "software sources" is missing. I am on ubuntu 16.04 : 4.4.0-140-generic. How can i enable lsb-release from the terminal ?
    – abbasi_ahsan
    Dec 20 '18 at 8:50










  • i had opened the /etc/apt/sources.list, but its empty !
    – abbasi_ahsan
    Dec 20 '18 at 8:51


















  • Does apt-cache policy lsb-release report that lsb-release package is intstalled?
    – karel
    Dec 20 '18 at 8:42










  • lsb-release: Installed: (none) Candidate: (none) Version table: 9.20160110ubuntu0.2 0 100 /var/lib/dpkg/status
    – abbasi_ahsan
    Dec 20 '18 at 8:43










  • You need to enable the standard software sources for your Ubuntu version in /etc/apt/sources.list to install lsb-release, What version of Ubuntu are you using?
    – karel
    Dec 20 '18 at 8:47












  • unfortunately the "software sources" is missing. I am on ubuntu 16.04 : 4.4.0-140-generic. How can i enable lsb-release from the terminal ?
    – abbasi_ahsan
    Dec 20 '18 at 8:50










  • i had opened the /etc/apt/sources.list, but its empty !
    – abbasi_ahsan
    Dec 20 '18 at 8:51
















Does apt-cache policy lsb-release report that lsb-release package is intstalled?
– karel
Dec 20 '18 at 8:42




Does apt-cache policy lsb-release report that lsb-release package is intstalled?
– karel
Dec 20 '18 at 8:42












lsb-release: Installed: (none) Candidate: (none) Version table: 9.20160110ubuntu0.2 0 100 /var/lib/dpkg/status
– abbasi_ahsan
Dec 20 '18 at 8:43




lsb-release: Installed: (none) Candidate: (none) Version table: 9.20160110ubuntu0.2 0 100 /var/lib/dpkg/status
– abbasi_ahsan
Dec 20 '18 at 8:43












You need to enable the standard software sources for your Ubuntu version in /etc/apt/sources.list to install lsb-release, What version of Ubuntu are you using?
– karel
Dec 20 '18 at 8:47






You need to enable the standard software sources for your Ubuntu version in /etc/apt/sources.list to install lsb-release, What version of Ubuntu are you using?
– karel
Dec 20 '18 at 8:47














unfortunately the "software sources" is missing. I am on ubuntu 16.04 : 4.4.0-140-generic. How can i enable lsb-release from the terminal ?
– abbasi_ahsan
Dec 20 '18 at 8:50




unfortunately the "software sources" is missing. I am on ubuntu 16.04 : 4.4.0-140-generic. How can i enable lsb-release from the terminal ?
– abbasi_ahsan
Dec 20 '18 at 8:50












i had opened the /etc/apt/sources.list, but its empty !
– abbasi_ahsan
Dec 20 '18 at 8:51




i had opened the /etc/apt/sources.list, but its empty !
– abbasi_ahsan
Dec 20 '18 at 8:51










1 Answer
1






active

oldest

votes


















2














lsb-release package is not installed, so you are getting an error message when sudo apt-get upgrade is trying to access it.



Download lsb-release_9.20160110_all.deb from the official Ubuntu website.



Open the terminal, change directories using cd to the directory where you downloaded lsb-release_9.20160110_all.deb and install it with the following command:



sudo apt install ./lsb-release_9.20160110_all.deb


Create a new sources.list file.



sudo mkdir -p /etc/apt/  
cd /etc/apt/
sudo touch sources.list


Open /etc/apt/sources.list for editing in nano text editor with the following command:



sudo nano etc/apt/sources.list  


Add the following lines to sources.list.



deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse  
deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu xenial partner


The instructions for using the nano editor are always found at the bottom of every page. Press the keyboard combination Ctrl+O and after that press Enter to save the file being edited. Press the keyboard combination Ctrl+X to exit nano.



Update the list of available software and fix broken packages.



sudo apt update  
sudo apt install lsb-release python3.5-minimal
sudo apt install python3 nvidia-prime
sudo reboot


If sudo apt update is successful, try to run sudo apt upgrade again.



sudo apt upgrade  





share|improve this answer























  • @abbasi_ahsan did you installed lsb-release_9.20160110_all.deb?
    – abu-ahmed al-khatiri
    Dec 20 '18 at 10:00










  • Yes i have. lsb-release: Installed: 9.20160110 Candidate: 9.20160110ubuntu0.2
    – abbasi_ahsan
    Dec 20 '18 at 10:01






  • 1




    Thanks for helping me out :)
    – abbasi_ahsan
    Dec 20 '18 at 10:56











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/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
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1103308%2fapt-get-upgrade-reports-error-in-ubuntu-mate-16-04%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









2














lsb-release package is not installed, so you are getting an error message when sudo apt-get upgrade is trying to access it.



Download lsb-release_9.20160110_all.deb from the official Ubuntu website.



Open the terminal, change directories using cd to the directory where you downloaded lsb-release_9.20160110_all.deb and install it with the following command:



sudo apt install ./lsb-release_9.20160110_all.deb


Create a new sources.list file.



sudo mkdir -p /etc/apt/  
cd /etc/apt/
sudo touch sources.list


Open /etc/apt/sources.list for editing in nano text editor with the following command:



sudo nano etc/apt/sources.list  


Add the following lines to sources.list.



deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse  
deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu xenial partner


The instructions for using the nano editor are always found at the bottom of every page. Press the keyboard combination Ctrl+O and after that press Enter to save the file being edited. Press the keyboard combination Ctrl+X to exit nano.



Update the list of available software and fix broken packages.



sudo apt update  
sudo apt install lsb-release python3.5-minimal
sudo apt install python3 nvidia-prime
sudo reboot


If sudo apt update is successful, try to run sudo apt upgrade again.



sudo apt upgrade  





share|improve this answer























  • @abbasi_ahsan did you installed lsb-release_9.20160110_all.deb?
    – abu-ahmed al-khatiri
    Dec 20 '18 at 10:00










  • Yes i have. lsb-release: Installed: 9.20160110 Candidate: 9.20160110ubuntu0.2
    – abbasi_ahsan
    Dec 20 '18 at 10:01






  • 1




    Thanks for helping me out :)
    – abbasi_ahsan
    Dec 20 '18 at 10:56
















2














lsb-release package is not installed, so you are getting an error message when sudo apt-get upgrade is trying to access it.



Download lsb-release_9.20160110_all.deb from the official Ubuntu website.



Open the terminal, change directories using cd to the directory where you downloaded lsb-release_9.20160110_all.deb and install it with the following command:



sudo apt install ./lsb-release_9.20160110_all.deb


Create a new sources.list file.



sudo mkdir -p /etc/apt/  
cd /etc/apt/
sudo touch sources.list


Open /etc/apt/sources.list for editing in nano text editor with the following command:



sudo nano etc/apt/sources.list  


Add the following lines to sources.list.



deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse  
deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu xenial partner


The instructions for using the nano editor are always found at the bottom of every page. Press the keyboard combination Ctrl+O and after that press Enter to save the file being edited. Press the keyboard combination Ctrl+X to exit nano.



Update the list of available software and fix broken packages.



sudo apt update  
sudo apt install lsb-release python3.5-minimal
sudo apt install python3 nvidia-prime
sudo reboot


If sudo apt update is successful, try to run sudo apt upgrade again.



sudo apt upgrade  





share|improve this answer























  • @abbasi_ahsan did you installed lsb-release_9.20160110_all.deb?
    – abu-ahmed al-khatiri
    Dec 20 '18 at 10:00










  • Yes i have. lsb-release: Installed: 9.20160110 Candidate: 9.20160110ubuntu0.2
    – abbasi_ahsan
    Dec 20 '18 at 10:01






  • 1




    Thanks for helping me out :)
    – abbasi_ahsan
    Dec 20 '18 at 10:56














2












2








2






lsb-release package is not installed, so you are getting an error message when sudo apt-get upgrade is trying to access it.



Download lsb-release_9.20160110_all.deb from the official Ubuntu website.



Open the terminal, change directories using cd to the directory where you downloaded lsb-release_9.20160110_all.deb and install it with the following command:



sudo apt install ./lsb-release_9.20160110_all.deb


Create a new sources.list file.



sudo mkdir -p /etc/apt/  
cd /etc/apt/
sudo touch sources.list


Open /etc/apt/sources.list for editing in nano text editor with the following command:



sudo nano etc/apt/sources.list  


Add the following lines to sources.list.



deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse  
deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu xenial partner


The instructions for using the nano editor are always found at the bottom of every page. Press the keyboard combination Ctrl+O and after that press Enter to save the file being edited. Press the keyboard combination Ctrl+X to exit nano.



Update the list of available software and fix broken packages.



sudo apt update  
sudo apt install lsb-release python3.5-minimal
sudo apt install python3 nvidia-prime
sudo reboot


If sudo apt update is successful, try to run sudo apt upgrade again.



sudo apt upgrade  





share|improve this answer














lsb-release package is not installed, so you are getting an error message when sudo apt-get upgrade is trying to access it.



Download lsb-release_9.20160110_all.deb from the official Ubuntu website.



Open the terminal, change directories using cd to the directory where you downloaded lsb-release_9.20160110_all.deb and install it with the following command:



sudo apt install ./lsb-release_9.20160110_all.deb


Create a new sources.list file.



sudo mkdir -p /etc/apt/  
cd /etc/apt/
sudo touch sources.list


Open /etc/apt/sources.list for editing in nano text editor with the following command:



sudo nano etc/apt/sources.list  


Add the following lines to sources.list.



deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse  
deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu xenial partner


The instructions for using the nano editor are always found at the bottom of every page. Press the keyboard combination Ctrl+O and after that press Enter to save the file being edited. Press the keyboard combination Ctrl+X to exit nano.



Update the list of available software and fix broken packages.



sudo apt update  
sudo apt install lsb-release python3.5-minimal
sudo apt install python3 nvidia-prime
sudo reboot


If sudo apt update is successful, try to run sudo apt upgrade again.



sudo apt upgrade  






share|improve this answer














share|improve this answer



share|improve this answer








edited Dec 20 '18 at 10:08

























answered Dec 20 '18 at 8:45









karel

57.3k12127146




57.3k12127146












  • @abbasi_ahsan did you installed lsb-release_9.20160110_all.deb?
    – abu-ahmed al-khatiri
    Dec 20 '18 at 10:00










  • Yes i have. lsb-release: Installed: 9.20160110 Candidate: 9.20160110ubuntu0.2
    – abbasi_ahsan
    Dec 20 '18 at 10:01






  • 1




    Thanks for helping me out :)
    – abbasi_ahsan
    Dec 20 '18 at 10:56


















  • @abbasi_ahsan did you installed lsb-release_9.20160110_all.deb?
    – abu-ahmed al-khatiri
    Dec 20 '18 at 10:00










  • Yes i have. lsb-release: Installed: 9.20160110 Candidate: 9.20160110ubuntu0.2
    – abbasi_ahsan
    Dec 20 '18 at 10:01






  • 1




    Thanks for helping me out :)
    – abbasi_ahsan
    Dec 20 '18 at 10:56
















@abbasi_ahsan did you installed lsb-release_9.20160110_all.deb?
– abu-ahmed al-khatiri
Dec 20 '18 at 10:00




@abbasi_ahsan did you installed lsb-release_9.20160110_all.deb?
– abu-ahmed al-khatiri
Dec 20 '18 at 10:00












Yes i have. lsb-release: Installed: 9.20160110 Candidate: 9.20160110ubuntu0.2
– abbasi_ahsan
Dec 20 '18 at 10:01




Yes i have. lsb-release: Installed: 9.20160110 Candidate: 9.20160110ubuntu0.2
– abbasi_ahsan
Dec 20 '18 at 10:01




1




1




Thanks for helping me out :)
– abbasi_ahsan
Dec 20 '18 at 10:56




Thanks for helping me out :)
– abbasi_ahsan
Dec 20 '18 at 10:56


















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.





Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


Please pay close attention to the following guidance:


  • 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%2f1103308%2fapt-get-upgrade-reports-error-in-ubuntu-mate-16-04%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

flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

Mangá

 ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕