0

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)
9
  • 1
    Check this answer - Removing not fully installed apps
    – digiwizkid
    Mar 15, 2017 at 14:59
  • I tried all of that, didn't work Mar 15, 2017 at 15:18
  • Please be clearer; what is the problem exactly?
    – fkraiem
    Mar 15, 2017 at 16:04
  • 1
    The point of the question is that the operation ends after "After this operation, 744kb of additional disk space will be used". No actual downloading, unpacking and installing is being done. The user is being returned to the prompt. This is not clear from the above text but was clear from the screenshot (which has since been removed).
    – Jos
    Mar 15, 2017 at 16:17
  • @Jos yeah, that is exactly what is happening. I've added the screenshot back for reference. Mar 15, 2017 at 17:52

1 Answer 1

0

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.

4
  • I tried the above steps, apt-get is still not installing the package. Mar 16, 2017 at 3:25
  • I added an edit to help with the download of the .deb file. But I am wondering if there is some additional intel you can provide. Like, have you modified your apt.conf file? What version of Ubuntu are you running? Is it a vanilla install, or are there other major packages/changes you've made? I am able to install the metacity package on a clean Ubuntu 16.04.2 without any trouble.
    – James
    Mar 16, 2017 at 4:08
  • I did not modify the apt.conf file. I am running 16.04 and it is a vanilla install. I had issue with apt before where dpkg was locked. I removed /var/lib/dpkg/lock to fix it. Mar 17, 2017 at 5:09
  • My apt.conf file is empty. Mar 17, 2017 at 5:19

Not the answer you're looking for? Browse other questions tagged .