By mistake it deleted the /usr/bin/dpkg.exe please help!!!
By mistake i deleted the /usr/bin/dpkg.exe file.Now i am unable to install anything .when i tried to install ssh i got the following error message.
Reading package lists... Done Building dependency tree Reading state information... Done openssh-server is already the newest version. openssh-client is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 386 not upgraded. 2 not fully installed or removed. After this operation, 0B of additional disk space will be used. Could not exec dpkg! E: Sub-process /usr/bin/dpkg returned an error code (100) Please somebody help me to resolve this. Thanks |
Linux executables do not have the .exe extension. Which version of Ubuntu are you using? Have you still got the installation DVD?
|
A couple of links with solutions:
http://ubuntuforums.org/showthread.php?t=197819 http://art.ubuntuforums.org/showthread.php?t=1516119 HTH |
@sycamorex
Sorry it wasn't exe file but looks like that and properties showed executable .I am using ubuntu 10.04.Now what to do ? Thanks. |
Quote:
Yes, the file had executable permissions. I was just pointing out that linux does not use the .exe file extension. It's a windows thing. Please check the links I posted above. They seem to have solutions to your problem. |
According to your link when i tried ,i got the following error.
sudo apt-get install dpkg --reinstall Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be upgraded: dpkg 1 upgraded, 0 newly installed, 0 to remove and 385 not upgraded. 2 not fully installed or removed. Need to get 0B/2,192kB of archives. After this operation, 0B of additional disk space will be used. /usr/bin/dpkg: 1: ELF: not found /usr/bin/dpkg: 2: @@@@@@00pp@p@@@4@4@: not found /usr/bin/dpkg: 1: Syntax error: Unterminated quoted string E: Sub-process /usr/bin/dpkg returned an error code (2) It seems to be different from that link.Now again strange.Help? Thanks |
http://art.ubuntuforums.org/showpost...05&postcount=5
This post appears to help, according to the OP on that forum thread. (same type of problem) |
What about the second link, post #6?
|
that's the same, as my link (based on your link, lol) .. but with a "it works" comment ;)
|
Quote:
|
I tried the this link too.But at the last command i got error as:
sudo apt-get install --reinstall dpkg Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be upgraded: dpkg 1 upgraded, 0 newly installed, 0 to remove and 385 not upgraded. 2 not fully installed or removed. Need to get 0B/2,192kB of archives. After this operation, 0B of additional disk space will be used. debconf: unable to initialize frontend: Dialog debconf: (Dialog frontend requires a screen at least 13 lines tall and 31 columns wide.) debconf: falling back to frontend: Readline /usr/bin/dpkg: 1: ELF: not found /usr/bin/dpkg: 2: @@@@@@00pp@p@@@4@4@: not found /usr/bin/dpkg: 1: Syntax error: Unterminated quoted string E: Sub-process /usr/bin/dpkg returned an error code (2) Please Help me. Thanks |
Quote:
installing dpkg from source. I'm sure there's a simpler solution, but if the worst comes to the worst, you can always grab dpkg sources and compile it: Code:
$ ./configure |
The easy way is to download a dpkg for your Ubuntu version.
http://packages.ubuntu.com/hardy/dpkg ar dpkg_<version>.deb : will unpack to : data.tar.gz tar xvf data.tar.gz : will unpack the executable /usr/bin/dpkg ... Then : sudo cp dpkg /usr/bin/ ... |
I have now /usr/bin/dpkg execable file.but still
sudo dpkg --configure -a give the error like dpkg: failed to open package info file `/usr/local/var/lib/dpkg/status' for reading: No such file or directory Thanks |
Quote:
ls -l /var/lib/dpkg/ If 'status' is in it you could create a link to it like ln -s /var/lib/dpkg/status /usr/local/var/lib/dpkg/status If you keep having more problems related to missing files in /usr/local/lib/dpkg/ then you could try to relink the whole directory, i.e. if the config files are available in the default directory (/var/lib/dpkg/). |
All times are GMT -5. The time now is 03:36 PM. |