1

My system is Ubuntu 16.04.7. When I use apt-get to install any package, it shows the error:

The following packages have unmet dependencies:
 libglib2.0-bin : Depends: libglib2.0-0 (= 2.48.2-0ubuntu4.7) but 2.48.2-0ubuntu4.8 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). 

Then, I try to use "sudo apt-get -f install" but it shows:

Unpacking libglib2.0-bin (2.48.2-0ubuntu4.8) over (2.48.2-0ubuntu4.7) ...
dpkg: error processing archive /var/cache/apt/archives/libglib2.0-bin_2.48.2-0ubuntu4.8_amd64.deb (--unpack):
 unable to create '/usr/bin/gapplication.dpkg-new' (while processing './usr/bin/gapplication'): Permission denied
Errors were encountered while processing:
 /var/cache/apt/archives/libglib2.0-bin_2.48.2-0ubuntu4.8_amd64.deb

I tried apt-cache policy libglig2.0-bin and it shows

libglib2.0-bin:
  Installed: 2.48.2-0ubuntu4.7
  Candidate: 2.48.2-0ubuntu4.8
  Version table:
     2.48.2-0ubuntu4.8 500
        500 http://repo.huaweicloud.com/ubuntu xenial-updates/main amd64 Packages
        500 http://repo.huaweicloud.com/ubuntu xenial-security/main amd64 Packages
 *** 2.48.2-0ubuntu4.7 100
        100 /var/lib/dpkg/status
     2.48.0-1ubuntu4 500
        500 http://repo.huaweicloud.com/ubuntu xenial/main amd64 Packages

The I run sudo apt upgrade, the same problem of libglib2.0 appears again.

I also find that I cannot create a new file in the \usr\bin\ even though I login as the root user. I am wondering if all of the abovementioned problems caused by this?

I have tried a lot of methods but still cannot fix it. Can anyone help?

YWQ
  • 19
  • 4

0 Answers0