0%

Manjaro升级错误解决方法

Manjaro是非常优秀的Linux发行版,我用了这么久没过出大问题,更没有碰到过滚动升级发行版偶尔出现的升级后系统倒地不起的情况。但有时候系统升级会出点小问题,下面将我碰到的问题及其解决办法列出来。

最常见的升级错误是由软件版本依赖造成的。一般来说,等软件仓库中的版本更新后,问题可能就解决了。libcanberra造成的版本依赖问题可以通过卸载来解决,运行如下命令卸载libcanberra后再重新升级系统即可:

1
sudo pacman -R lib32-libcanberra-pulse lib32-libcanberra-gstreamer libcanberra-pulse libcanberra-gstreamer

我还碰到过PGP key丢失导致升级失败,出错日志如下:

1
2
3
4
5
6
downloading required keys...
:: Import PGP key F9F9FA97A403F63E, "lilac (on behalf of edward) <edward@edward-p.xyz>"? [Y/n]
error: key "F9F9FA97A403F63E" could not be looked up remotely
error: required key missing from keyring
error: failed to commit transaction (unexpected error)
Errors occurred, no packages were upgraded.

安装archlinuxcn-keyring即可解决该问题。

还有个npm无法升级的问题,错误日志如下:

1
2
3
4
5
6
7
error: failed to commit transaction (conflicting files)
npm: /usr/lib/node_modules/npm/lib/utils/read-package-name.js exists in filesystem
......
...... many similar lines are ommitted
......
npm: /usr/lib/node_modules/npm/node_modules/negotiator/package.json exists in filesystem
Errors occurred, no packages were upgraded.

可通过以下命令强行安装:

1
sudo pacman -S npm --overwrite='*'

参考

  1. cannot upgrade - could not satisfy lib32 dependencies
  2. Update problem- libcanberra-gstreamer
  3. 使用pacman -s出现问题
  4. npm update error in arch #636