apt-get 不起作用

apt-get 不起作用

我的系统是Ubuntu 16.04.7,apt-get安装任何包时都会报错:

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). 

然后,我尝试使用“ sudo apt-get -f install”,但它显示:

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

我试过了apt-cache policy libglig2.0-bin,结果显示

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

再次运行sudo apt upgrade,libglib2.0的同样问题又出现。

我还发现即使我以 root 用户身份登录,也无法创建新文件\usr\bin\。我想知道上述所有问题是否都是由此引起的?

我尝试了很多方法但仍然无法解决。有人可以帮忙吗?

相关内容