Workaround for pepperflashplugin-nonfree install fails "Can't drop privileges"
-----------------------------------------------------------------------------
On install, this error message occurs...
ERROR: failed to retrieve status information from google : W: Can't drop privileges for downloading as file './var/lib/apt/lists/partial/dl.google.com_linux_chrome_deb_dists_stable_InRelease' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
Note that the package *does* actually get installed, but its installer script fails to run properly. Lets help it run properly... Run these commands in a terminal window:
#
# Part 1: Copy, edit, then run a modified copy of the script (as user _apt),
# to download the plugin
#
Workaround for pepperflashplug in-nonfree install fails "Can't drop privileges" ------- ------- ------- ------- ------- ------- ------- ------- ------- -------
-------
On install, this error message occurs...
ERROR: failed to retrieve status information from google : W: Can't drop privileges for downloading as file './var/ lib/apt/ lists/partial/ dl.google. com_linux_ chrome_ deb_dists_ stable_ InRelease' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)
Note that the package *does* actually get installed, but its installer script fails to run properly. Lets help it run properly... Run these commands in a terminal window:
#
# Part 1: Copy, edit, then run a modified copy of the script (as user _apt),
# to download the plugin
#
cp /usr/sbin/ update- pepperflashplug in-nonfree /tmp
sudo chown _apt /var/cache/ pepperflashplug in-nonfree/ /usr/lib/ pepperflashplug in-nonfree/
editor /tmp/update- pepperflashplug in-nonfree
{ Find this line, and insert a '#' to comment it out }:
[ `id -u` = "0" ] || die_hard "must be root"
... becomes ...
#[ `id -u` = "0" ] || die_hard "must be root"
sudo -u _apt /tmp/update- pepperflashplug in-nonfree --install --verbose
It will download the latest plugin, but then fail with this error:
chown: changing ownership of '/usr/lib/ pepperflashplug in-nonfree/ libpepflashplay er.so': Operation not permitted
Good. Proceed...
#
# Part 2: Edit and run the script a second time (as user root)
# to install the plugin
#
editor /tmp/update- pepperflashplug in-nonfree
{ Find this line, and insert a '#' to comment it out }:
... becomes ...
#stdouterr= `APT_CONFIG= apt.conf apt-get --quiet --quiet update 2>&1`
sudo /tmp/update- pepperflashplug in-nonfree --install --verbose
Ignore the "E: No packages found" and "ls: cannot access" errors.
It should run successfully to completion anyway, ending with:
end of update- pepperflashplug in-nonfree
sudo chown root /var/cache/ pepperflashplug in-nonfree/ /usr/lib/ pepperflashplug in-nonfree/