I use Ubuntu 16.04. Since few days when I try to install an application I receive the following error message below.
For example, today the following :
$ sudo apt-get install sublime-text-installerProvides the following error message :
E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?
I also tried to resolve the issue as advised here, using the followings commands :
$sudo lsof /var/lib/dpkg/lock
$sudo lsof /var/lib/apt/lists/lock
$sudo lsof /var/cache/apt/archives/lockThen :
$sudo kill -9 <process_id>Then the commands below :
$sudo rm /var/lib/apt/lists/lock
$sudo rm /var/cache/apt/archives/lock
$sudo rm /var/lib/dpkg/lockThen the command :
$sudo dpkg --configure -aHowever, when enter again the command below I have a frame asking to hit "OK" while it's not possible (as you can see in the file attached):
$ sudo apt-get install sublime-text-installerThe issue may come from Software Center/Ubuntu Software since it doesn't launch.
Thanks in advance for your help.
31 Answer
From /var/lib/dpkg/info/ttf-mscorefonts-installer.postinst you can find the value to pre-accept the EULA
# if the license was not accepted, ensure the fonts are removed
# and add README with helpful information FONTDIR=/usr/share/fonts/truetype/msttcorefonts mkdir -p $FONTDIR license=mscorefonts-eula db_get msttcorefonts/accepted-$license if [ "$RET" != "true" ]; then echo "user did not accept the $license license" >&2 rm -f $FONTDIR/*.ttf cat > $FONTDIR/README <<EOF
License refused.So we can use the debconf-set-selections utility:
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true
| sudo debconf-set-selections
sudo apt-get install ttf-mscorefonts-installerThen install:
sudo apt-get install sublime-text-installer 3