Cannot hit the 'OK' button - E: Unable to acquire the dpkg frontend lock - Software center probable issue

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-installer

Provides 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/lock

Then :

$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/lock

Then the command :

$sudo dpkg --configure -a

However, 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-installer

The issue may come from Software Center/Ubuntu Software since it doesn't launch.enter image description here

Thanks in advance for your help.

3

1 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-installer

Then install:

sudo apt-get install sublime-text-installer
3

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like