我刚刚在我的系统上运行了更新,并且我的 msbuild 包出现安装错误。
运行后sudo apt update && sudo apt upgrade && sudo apt dist-upgrade
,我收到此错误消息:
Preparing to Unpack .../msbuild_1%3a16.0+xamarinxplat.2019.05.07.15.32-0xamarin2+ubuntu1804b1_all.deb ...
Unpacking msbuild (1:16.0+xamarinxplat.2019.05.07.15.32-0xamarin2+ubuntu1804b1) over (1:16.0+xamarinxplat.2018.09.26.17.53-0xamarin3+ubuntu1804b1) ...
dpkg: error while processing the file /var/cache/apt/archives/msbuild_1%3a16.0+xamarinxplat.2019.05.07.15.32-0xamarin2+ubuntu1804b1_all.deb (--unpack):
trying to overwrite '/usr/lib/mono/msbuild/15.0', which is also in the package mono-roslyn 5.20.1.19-0xamarin2+ubuntu1804b1
Errors were encountered while processing:
/var/cache/apt/archives/msbuild_1%3a16.0+xamarinxplat.2019.05.07.15.32-0xamarin2+ubuntu1804b1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
我也尝试使用sudo dpkg -i --force-depends /var/cache/apt/archives/msbuild_1%3a16.0+xamarinxplat.2019.05.07.15.32-0xamarin2+ubuntu1804b1_all.deb
. 然后我得到了几乎相同的错误信息:
(Lendo banco de dados ... 230920 ficheiros e directórios actualmente instalados.)
A preparar para desempacotar .../msbuild_1%3a16.0+xamarinxplat.2019.05.07.15.32-0xamarin2+ubuntu1804b1_all.deb ...
A descompactar msbuild (1:16.0+xamarinxplat.2019.05.07.15.32-0xamarin2+ubuntu1804b1) sobre (1:16.0+xamarinxplat.2018.09.26.17.53-0xamarin3+ubuntu1804b1) ...
dpkg: erro ao processar o arquivo /var/cache/apt/archives/msbuild_1%3a16.0+xamarinxplat.2019.05.07.15.32-0xamarin2+ubuntu1804b1_all.deb (--install):
a tentar sobre-escrever '/usr/lib/mono/msbuild/15.0', que também está no pacote mono-roslyn 5.20.1.19-0xamarin2+ubuntu1804b1
Erros foram encontrados durante o processamento de:
/var/cache/apt/archives/msbuild_1%3a16.0+xamarinxplat.2019.05.07.15.32-0xamarin2+ubuntu1804b1_all.deb