如何修复 Ubuntu 上“...script returned error exit status 1”

今天,我在更新VirtualBox新版本的时候遇到了一个问题。

E: /var/cache/apt/archives/ subprocess new pre-removal script returned error exit status 1

如何修复 Ubuntu 上“...script returned error exit status 1”

 

解决:

我google了一下并找到了方法。下面是我解决的方法。

  1. <span class="pln">sudo apt</span><span class="pun">-</span><span class="kwd">get</span><span class="pln"> clean</span>
  2. <span class="pln">sudo apt</span><span class="pun">-</span><span class="kwd">get</span><span class="pln"> update </span><span class="pun">&&</span><span class="pln"> sudo apt</span><span class="pun">-</span><span class="kwd">get</span><span class="pln"> upgrade</span>

这样几乎可以修复这个问题了。

如果你仍然有问题,那就试试下面的命令:

  1. <span class="pln">sudo dpkg </span><span class="pun">--</span><span class="pln">configure </span><span class="pun">-</span><span class="pln">a</span>
  2. <span class="pln">sudo apt</span><span class="pun">-</span><span class="kwd">get</span><span class="pun">-</span><span class="pln">f install</span>

或者你可以按照下面的方法从Oracle VirtualBox官网下载最新版本并安装。

  1. <span class="pln">sudo apt</span><span class="pun">-</span><span class="kwd">get</span><span class="pln"> update </span>
  2. <span class="pln">sudo dpkg </span><span class="pun">-</span><span class="pln">i virtualbox</span><span class="pun">-</span><span class="lit">4.3</span><span class="pln">_4</span><span class="pun">.</span><span class="lit">3.24</span><span class="pun">-</span><span class="lit">98716</span><span class="pun">~</span><span class="typ">Ubuntu</span><span class="pun">~</span><span class="pln">raring_amd64</span><span class="pun">.</span><span class="pln">deb </span>
  3. <span class="pln">sudo apt</span><span class="pun">-</span><span class="kwd">get</span><span class="pun">-</span><span class="pln">f install</span>
  4. <span class="pln">sudo apt</span><span class="pun">-</span><span class="kwd">get</span><span class="pln"> autoclean </span><span class="pun">&&</span><span class="pln"> sudo apt</span><span class="pun">-</span><span class="kwd">get</span><span class="pln"> autoremove</span>

干杯!

相关推荐