LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-15-2011, 07:04 AM   #1
amritpalpathak
Member
 
Registered: Feb 2010
Posts: 116

Rep: Reputation: 15
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
 
Old 01-15-2011, 07:06 AM   #2
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
Linux executables do not have the .exe extension. Which version of Ubuntu are you using? Have you still got the installation DVD?
 
Old 01-15-2011, 07:11 AM   #3
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
A couple of links with solutions:
http://ubuntuforums.org/showthread.php?t=197819
http://art.ubuntuforums.org/showthread.php?t=1516119

HTH
 
Old 01-15-2011, 07:38 AM   #4
amritpalpathak
Member
 
Registered: Feb 2010
Posts: 116

Original Poster
Rep: Reputation: 15
@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.
 
Old 01-15-2011, 07:42 AM   #5
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
Quote:
Originally Posted by amritpalpathak View Post
@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.

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.
 
Old 01-15-2011, 08:02 AM   #6
amritpalpathak
Member
 
Registered: Feb 2010
Posts: 116

Original Poster
Rep: Reputation: 15
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
 
Old 01-15-2011, 08:09 AM   #7
teebones
Member
 
Registered: Aug 2005
Location: /home/teebones
Distribution: sometimes this, sometimes that..
Posts: 502

Rep: Reputation: 56
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)
 
Old 01-15-2011, 08:09 AM   #8
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
What about the second link, post #6?
 
Old 01-15-2011, 08:11 AM   #9
teebones
Member
 
Registered: Aug 2005
Location: /home/teebones
Distribution: sometimes this, sometimes that..
Posts: 502

Rep: Reputation: 56
that's the same, as my link (based on your link, lol) .. but with a "it works" comment
 
Old 01-15-2011, 08:15 AM   #10
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
Quote:
Originally Posted by teebones View Post
that's the same, as my link (based on your link, lol) .. but with a "it works" comment
Did not notice your comment when writing mine
 
Old 01-15-2011, 08:19 AM   #11
amritpalpathak
Member
 
Registered: Feb 2010
Posts: 116

Original Poster
Rep: Reputation: 15
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
 
Old 01-15-2011, 08:29 AM   #12
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
Quote:
Originally Posted by amritpalpathak View Post
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
Perhaps, some ubuntu users will be able to crack this one as I have no other suggestions than
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
$ make 
# make install
 
Old 01-15-2011, 09:20 AM   #13
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
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/
...

Last edited by knudfl; 01-15-2011 at 09:21 AM.
 
Old 01-15-2011, 10:57 AM   #14
amritpalpathak
Member
 
Registered: Feb 2010
Posts: 116

Original Poster
Rep: Reputation: 15
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
 
Old 01-15-2011, 11:29 AM   #15
crts
Senior Member
 
Registered: Jan 2010
Posts: 2,020

Rep: Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757Reputation: 757
Quote:
Originally Posted by amritpalpathak View Post
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
Normally the status file should be in /var/lib/dpkg/status, at least it is on ubuntu 10.10. What is the output of
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/).
 
1 members found this post helpful.
  


Reply

Tags
dpkg



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Input/Output Error; dpkg sub-process /usr/bin/dpkg returned and error code (2) NosLycn Linux - Software 7 12-12-2011 02:50 AM
E: Sub-process /usr/bin/dpkg returned an error code (1) ashwani.sahni Ubuntu 1 05-14-2010 08:43 AM
echo $PATH = /home/g3rc4n/bin:/usr/local/bin:/usr/bin:/bin:/usr/games ? i_heart_pandas Linux - Software 7 09-18-2009 08:33 AM
I've deleted /bin by mistake. Now I can't boot my Slackware64 13 system. glore2002 Slackware 16 09-06-2009 07:39 PM
Sub-process /usr/bin/dpkg returned an error code kako13 Debian 2 05-15-2008 06:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:28 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration