fgrehm / vagrant-cachier

Caffeine reducer
http://fgrehm.viewdocs.io/vagrant-cachier
MIT License
1.08k stars 111 forks source link

E: List directory /var/lib/apt/lists/partial is missing. - Acquire (2: No such file or directory) #170

Closed wicope closed 8 years ago

wicope commented 8 years ago
$ vagrant plugin install vagrant-cachier
Installing the 'vagrant-cachier' plugin. This can take a few minutes...
Installed the plugin 'vagrant-cachier (1.2.1)'!

$ vagrant --version
Vagrant 1.8.1

Vagrantfile
config.vm.box = "ubuntu/vivid64"
The following packages will be REMOVED:
  virtualbox-guest-dkms* virtualbox-guest-utils* virtualbox-guest-x11*
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
E: List directory /var/lib/apt/lists/partial is missing. - Acquire (2: No such file or directory)
stdin: is not a tty
Reading package lists...
Building dependency tree...
Reading state information...
linux-headers-3.19.0-47-generic is already the newest version.
dkms is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Copy iso file /usr/share/virtualbox/VBoxGuestAdditions.iso into the box /tmp/VBoxGuestAdditions.iso
stdin: is not a tty
mount: /dev/loop0 is write-protected, mounting read-only
Installing Virtualbox Guest Additions 5.0.14 - guest version is 4.3.34
stdin: is not a tty
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.0.14 Guest Additions for Linux............
VirtualBox Guest Additions installer
You appear to have a version of the VBoxGuestAdditions software
on your system which was installed from a different source or using a
different type of installer.  If you installed it from a package from your
Linux distribution or if it is a default part of the system then we strongly
recommend that you cancel this installation and remove it properly before
installing this version.  If this is simply an older or a damaged
installation you may safely proceed.

Do you wish to continue anyway? [yes or no]

Cancelling installation.
An error occurred during installation of VirtualBox Guest Additions 5.0.14. Some functionality may not work as intended.
In most cases it is OK that the "Window System drivers" installation failed.
stdin: is not a tty
==> ttrss: Checking for guest additions in VM...
    ttrss: The guest additions on this VM do not match the installed version of
    ttrss: VirtualBox! In most cases this is fine, but in rare cases it can
    ttrss: prevent things such as shared folders from working properly. If you see
    ttrss: shared folder errors, please make sure the guest additions within the
    ttrss: virtual machine match the version of VirtualBox you have installed on
    ttrss: your host and reload your VM.
    ttrss: 
    ttrss: Guest Additions Version: 4.3.34
    ttrss: VirtualBox Version: 5.0
==> ttrss: Setting hostname...
==> ttrss: Configuring and enabling network interfaces...
==> ttrss: Mounting shared folders...
    ttrss: /vagrant => /media/AlmacenDatos/programacion.wicope/workspace/wicope-service/ttrss
Failed to mount folders in Linux guest. This is usually because
the "vboxsf" file system is not available. Please verify that
the guest additions are properly installed in the guest and
can work properly. The command attempted was:

mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3` vagrant /vagrant
mount -t vboxsf -o uid=`id -u vagrant`,gid=`id -g vagrant` vagrant /vagrant

The error output from the last command was:

stdin: is not a tty
/sbin/mount.vboxsf: mounting failed with the error: No such device

Attention:

E: List directory /var/lib/apt/lists/partial is missing. - Acquire (2: No such file or directory)
E: Archives directory /var/cache/apt/archives/partial is missing. - Acquire (2: No such file or directory) 
vagrant@ttrss:~$ ls /var/lib/apt/lists 
/var/lib/apt/lists

vagrant@ttrss:~$ ls -la /var/lib/apt/lists 
lrwxrwxrwx 1 root root 28 Feb 19 15:11 /var/lib/apt/lists -> /tmp/vagrant-cache/apt_lists

vagrant@ttrss:~$ ls -la /var/cache/apt/
lrwxrwxrwx  1 root root     22 Feb 19 15:11 archives -> /tmp/vagrant-cache/apt

vagrant@ttrss:~$ ls -la /tmp/vagrant-cache/apt_lists
ls: cannot access /tmp/vagrant-cache/apt_lists: No such file or directory

Why?:

ls: cannot access /tmp/vagrant-cache/apt_lists: No such file or directory

Solution for now:

1 disable plugin

editor Vagrantfile
#  if Vagrant.has_plugin?("vagrant-cachier")
#    config.cache.scope = :box
#  end

2 /var/lib/apt/lists/partial

sudo rm /var/lib/apt/lists
sudo mkdir /var/lib/apt/lists/partial

3 /var/cache/apt/archives

sudo rm /var/cache/apt/archives
sudo mkdir -p /var/cache/apt/archives/partial
phs commented 8 years ago

Did you restart the vagrant instance from within the guest, instead of with the vagrant CLI outside on the host? You may be encountering #128

lferro9000 commented 7 years ago

I faced exactly the same issue and i can confirm that going outside of the guest, into the host and do a vagrant reload fixes this.

alastairmoore commented 5 years ago

I've been having the same issue and vagrant reload is not fixing this. The suggestion made by @wicope is working but that is just removing vagrant cachier which isn't really a fix.