could not exec dpkg的解決
通過apt-get install *** 時遇到問題“could not exec dpkg!”,經過多方搜索,最後終於解決了,整理如下: www.2cto.com
1、mkdir /tmp/dpkg
cd tmp/dpkg
wget http://archive.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg_1.15.5.6ubuntu4_i386.deb (32位系統) 或: www.2cto.com
wget http://archive.ubuntu.com/ubuntu/pool/main/d/dpkg/dpkg_1.15.5.6ubuntu4_amd64.deb(64 bit os)
ar x dpkg*.deb data.tar.gz
tar xfvz data.tar.gz
sudo cp ./usr/bin/dpkg /usr/bin/
sudo apt-get install update
sudo apt-get install --reinstall dpkg
2、then it works!
不清楚為什麼dpkg disappear了,解決的過程中踩到很多坑,比如說wget的時候下了個32位系統的dpkg,解壓縮時用“tar xfvz data.tar.gz ./usr/bin/dpkg”,然後發現少了一個dpkg-dev,一直沒注意,耽誤了不少時間。 www.2cto.com
anyway,希望對您有用~
參考url:http://ubuntuforums.org/showthread.php?t=1516119
https://answers.launchpad.net/ubuntu/+source/apt/+question/177908