我安装了 Unity 5.3.4f1,但我想升级到最新版本 2017.2.0f3,所以我从这里然后我尝试安装它,因此我输入:
sudo dpkg -i unity-editor_amd64-2017.2.0f3.deb
一段时间后产生以下输出:
(Reading database ... 294886 files and directories currently installed.)
Preparing to unpack unity-editor_amd64-2017.2.0f3.deb ...
Unpacking unity-editor (2017.2.0f3) over (5.3.4f1) ...
dpkg-deb (subprocess): cannot copy archive member from 'unity-editor_amd64-2017.2.0f3.deb' to decompressor pipe: unexpected end of file or stream
dpkg-deb: error: subprocess paste returned error exit status 2
dpkg: error processing archive unity-editor_amd64-2017.2.0f3.deb (--install):
cannot copy extracted data for './opt/Unity/Editor/Data/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/jaxen-1.1.jar' to '/opt/Unity/Editor/Data/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/jaxen-1.1.jar.dpkg-new': unexpected end of file or stream
Errors were encountered while processing:
unity-editor_amd64-2017.2.0f3.deb
为什么会这样?我该如何解决?
答案1
只需从中删除 Unity 文件夹/opt/
并使用它gdebi
安装新版本,事实证明这比使用dpkg
并担心依赖关系要好得多。因此只需执行以下操作:
sudo rm -r /opt/Unity/
sudo apt update
sudo apt install gdebi
sudo gdebi unity-editor_amd64-2017.2.0f3.deb