Ubuntu: apt-get doesn't show any error but not installing or removing packages



Question:

I get this whenever I try to install a package

$ sudo apt-get install metacity  Reading package lists... Done  Building dependency tree         Reading state information... Done  Suggested packages:    gnome-control-center  The following NEW packages will be installed:    metacity  0 upgraded, 1 newly installed, 0 to remove and 157 not upgraded.  1 not fully installed or removed.  Need to get 0 B/243 kB of archives.  After this operation, 744 kB of additional disk space will be used.  $   

I tried the basic fixes, didn't work.

sudo apt-get clean && sudo apt-get autoremove  sudo apt-get -f install  sudo dpkg --configure -a  

This is what I get when I do an apt download

$ sudo apt download metacity  Get:1 http://in.archive.ubuntu.com/ubuntu xenial/main amd64 metacity amd64 1:3.18.3-1ubuntu3 [243 kB]  Fetched 243 kB in 2s (90.4 kB/s)  W: Can't drop privileges for downloading as file '/home/jaison/metacity_1%3a3.18.3-1ubuntu3_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)  


Solution:1

Try:

sudo apt-get clean  sudo apt-get clean all  sudo apt-get update  sudo apt-get upgrade  

Then try installing the package you want. If it still fails, post new error.

edit:

also, if you want to download the the .deb, don't use sudo. Just run:

apt-get download metacity  

that will fix the permission issue. When you try to download using sudo, the account that actually downloads the file is "_apt" and _apt does not have permission to write in your home directory.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »