web-dev-qa-db-ja.com

E:サブプロセス/ usr / bin / dpkgがエラーコード(1)およびその他のエラーを返しました

OpenGLを更新しようとしていました(別の日の問題ですが、その面で助けていただければ幸いです)。

root@Friithian:/home/gunqqer# apt autoremove  
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
 libdrm-dev : Depends: libdrm-amdgpu1 (= 2.4.89+git1712180630.831036~oibaf~x) but 2.4.83-1~16.04.1 is installed
 libgl1-mesa-dri : Depends: libdrm-amdgpu1 (>= 2.4.89+git1712180630.831036~oibaf~x) but 2.4.83-1~16.04.1 is installed
 libgl1-mesa-dri:i386 : Depends: libdrm-amdgpu1:i386 (>= 2.4.89+git1712180630.831036~oibaf~x) but 2.4.83-1~16.04.1 is installed
 mesa-va-drivers : Depends: libdrm-amdgpu1 (>= 2.4.89+git1712180630.831036~oibaf~x) but 2.4.83-1~16.04.1 is installed
 mesa-vdpau-drivers : Depends: libdrm-amdgpu1 (>= 2.4.89+git1712180630.831036~oibaf~x) but 2.4.83-1~16.04.1 is installed
E: Unmet dependencies. Try using -f.

それで私はやった

root@Friithian:/home/gunqqer# apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
  libdrm-common
Use 'Sudo apt autoremove' to remove it.
The following additional packages will be installed:
  libdrm-amdgpu1 libdrm-amdgpu1:i386
The following packages will be upgraded:
  libdrm-amdgpu1 libdrm-amdgpu1:i386
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
15 not fully installed or removed.
Need to get 0 B/60.1 kB of archives.
After this operation, 16.4 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 232943 files and directories currently installed.)
Preparing to unpack .../libdrm-amdgpu1_2.4.89+git1712180630.831036~oibaf~x_AMD64.deb ...
De-configuring libdrm-amdgpu1:i386 (2.4.83-1~16.04.1) ...
Unpacking libdrm-amdgpu1:AMD64 (2.4.89+git1712180630.831036~oibaf~x) over (2.4.83-1~16.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/libdrm-amdgpu1_2.4.89+git1712180630.831036~oibaf~x_AMD64.deb (--unpack):
 trying to overwrite '/usr/share/libdrm/amdgpu.ids', which is also in package libdrm-common 2.4.83-1~16.04.1
Preparing to unpack .../libdrm-amdgpu1_2.4.89+git1712180630.831036~oibaf~x_i386.deb ...
De-configuring libdrm-amdgpu1:AMD64 (2.4.83-1~16.04.1) ...
Unpacking libdrm-amdgpu1:i386 (2.4.89+git1712180630.831036~oibaf~x) over (2.4.83-1~16.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/libdrm-amdgpu1_2.4.89+git1712180630.831036~oibaf~x_i386.deb (--unpack):
 trying to overwrite '/usr/share/libdrm/amdgpu.ids', which is also in package libdrm-common 2.4.83-1~16.04.1
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Errors were encountered while processing:
 /var/cache/apt/archives/libdrm-amdgpu1_2.4.89+git1712180630.831036~oibaf~x_AMD64.deb
 /var/cache/apt/archives/libdrm-amdgpu1_2.4.89+git1712180630.831036~oibaf~x_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

だから、私はこれを修正するために何をすべきかわからない。コマンドを実行して結果を伝える必要がある場合は、できます。

2
Gunqqer

デフォルトのdpkg上書きステータスが原因です。 dpkgは、許可なしに共有フォルダーに上書きしません。回避策:

押す Ctrl+Alt+T そして、やります:

Sudo apt-get -o Dpkg::Options::="--force-overwrite" -f install

それが役に立てば幸い...

4
Olimjon