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.

Every time I use the CLI to install something with aptitude I get this output:

warning, in file '/var/lib/dpkg/status' near line 60509 package 'virtualbox-3.0':
 error in Version string '3.0.10-54097_Ubuntu_karmic': invalid character in revision number
warning, in file '/var/lib/dpkg/status' near line 60510 package 'virtualbox-3.0':
 error in Config-Version string '3.0.10-54097_Ubuntu_karmic': invalid character in revision number
warning, in file '/var/lib/dpkg/available' near line 64255 package 'virtualbox-3.0':
 error in Version string '3.0.10-54097_Ubuntu_karmic': invalid character in revision number
Selecting previously deselected package libppl7.
(Reading database ... 328408 files and directories currently installed.)
Unpacking libppl7 (from .../libppl7_0.10.2-7ubuntu1_amd64.deb) ...
...
...
Processing triggers for man-db ...
warning, in file '/var/lib/dpkg/status' near line 60773 package 'virtualbox-3.0':
 error in Version string '3.0.10-54097_Ubuntu_karmic': invalid character in revision number
warning, in file '/var/lib/dpkg/status' near line 60774 package 'virtualbox-3.0':
 error in Config-Version string '3.0.10-54097_Ubuntu_karmic': invalid character in revision number
warning, in file '/var/lib/dpkg/available' near line 64482 package 'virtualbox-3.0':
 error in Version string '3.0.10-54097_Ubuntu_karmic': invalid character in revision number
Setting up libppl7 (0.10.2-7ubuntu1) ...
...

How can I fix this? I have even removed virtualbox, but this output still persists.

There is this on the Ubuntu forums http://ubuntuforums.org/showthread.php?t=1578934 but it did not work for me (Which step in the process given there actually fixes this problem?!).

EDIT: The installation process itself works, but these lines are cluttering up the output.

share|improve this question

2 Answers 2

up vote 5 down vote accepted

Type the following in terminal:

sudo dpkg --clear-avail

You need to edit the file and remove the offensive characters manually. Make a backup of the existing file.

sudo cp /var/lib/dpkg/status /var/lib/dpkg/status.bad

gksudo gedit /var/lib/dpkg/status

Go to line 60773, 60774 and 64482. The problem seems to be that the underscore has become at some point an illegal character in Debian package names. Edit the offending lines, change all underscores to tildes(~) will solve your problem.

share|improve this answer

If you have already purged the package(s), see also dpkg --clear-avail. You'll then need to regenerate the list of available packages with dselect update. Note: these steps presume that you've removed the deb{,-src} entr{y,ies} from /etc/apt/sources*

share|improve this answer

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.