Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

When I tried to update my system and installing new program. It failed because of following error. I tried to remove Swish++, but that also failed. So currently I am not able to update/upgrade/install/uninstall/remove any packages from my system. I have tried F- Install but that is also not working.

kindly guide to solve this problem.

 `Depends' field, reference to `libc6':
     implicit exact match on version number, suggest using `=' instead
    dpkg: warning: parsing file '/var/lib/dpkg/status' near line 1050 package 'swish++':
     `Depends' field, reference to `libc6':
     version value starts with non-alphanumeric, suggest adding a space
    dpkg: error: parsing file '/var/lib/dpkg/status' near line 1050 package 'swish++':
     `Depends' field, reference to `libc6': version contains ` '
    E: Sub-process /usr/bin/dpkg returned an error code (2)
    A package failed to install.  Trying to recover:
    dpkg: warning: parsing file '/var/lib/dpkg/status' near line 1050 package 'swish++':
     `Depends' field, reference to `libc6':
     implicit exact match on version number, suggest using `=' instead
    dpkg: warning: parsing file '/var/lib/dpkg/status' near line 1050 package 'swish++':
     `Depends' field, reference to `libc6':
     version value starts with non-alphanumeric, suggest adding a space
    dpkg: error: parsing file '/var/lib/dpkg/status' near line 1050 package 'swish++':
     `Depends' field, reference to `libc6': version contains ` '

Requested output from comment:

arif@arif-desktop:~$ head -n 1050 /var/lib/dpkg/status | tail -n 1
Depends: libc6 (.= 2.7), libstdc++6 (>= 4.6), zlib1g (>= 1:1.1.4), perl5 
share|improve this question
1  
Welcome at askubuntu, I'm not quite sure what your question is. Please describe what you did and what happened. Try to give as much as information as possible. This can help to solve your question. Have fun at Askubuntu –  qbi Dec 18 '12 at 15:51
    
Still waiting for Answer.... –  Arif Kapadia Dec 21 '12 at 8:39
    
Please open a terminal and enter: head -n 1050 /var/lib/dpkg/status | tail -n 1. Copy the output into your question. I assume this line has something wrong in it. –  qbi Dec 21 '12 at 11:47
    
arif@arif-desktop:~$ head -n 1050 /var/lib/dpkg/status | tail -n 1 Depends: libc6 (.= 2.7), libstdc++6 (>= 4.6), zlib1g (>= 1:1.1.4), perl5 arif@arif-desktop:~$ –  Arif Kapadia Dec 23 '12 at 10:25

1 Answer 1

As the output suggests, your /var/lib/dpkg/status file has an error in it. The line 1050 prints

Depends: libc6 (.= 2.7)

The dot should be a greater than sign (>). The various package commands (dpkg, apt-get etc.) don't understand what the dot is for. They are rather strict in their syntax. You should change this to the correct value.

So open the file as user root and change the value. You can use the editor vim:

sudo vim /var/lib/dpkg/status

and enter the sequence 1050Gf.r>:wq. This sequence goes to line 1050 (1050G), searches for a dit (f.), replaces it with > (r>) and saves/closes the file (:wq).

Another way would be sed:

sudo sed -i.bak 's,^\(Depends: *libc6 *(\.\),\1,' /var/lib/dpkg/status

However you could also use any graphical editor, like Geany, Gedit or others. Assuming you are using Geany:

  1. gksu geany +1050 /var/lib/dpkg/status
    This command will first ask for your user password and afterwards open the file at line 1050. The line should begin with Depends and you'll find the dot after the opening braket.
  2. Move the cursor to the dot and change it to >. So that it reads libc6 (>= 2.7)
  3. Save (Ctrl-S)and close the file.
  4. Update the packages with synaptic or software center. Now everything should be working as expected.
share|improve this answer
    
vim is not working........is there any other way to resolve it..I don't know how to use Geany or Gedit –  Arif Kapadia Dec 25 '12 at 18:17
    
plz explain me in asimple way...so I can try to resolve it......I had tried previous suggestions but didn't work –  Arif Kapadia Dec 25 '12 at 18:36
    
I explained a bit more. Does this help? –  qbi Jan 4 '13 at 16:21

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.