Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Earlier i could install software by using the 'sudo aptitude install ' command. Today when i tried to install rkhunter i am getting errors. It is not just rkhunter, i am not able to install anything.

Here is the text output:

user@server:~$ sudo aptitude install rkhunter
................
................
20% [3 rkhunter 947/271kB 0%]

Get:4 http://archive.ubuntu.com karmic/universe unhide 20080519-4 [832kB]


40% [4 unhide 2955/832kB 0%]

100% [Working]

Fetched 1394kB in 1s (825kB/s)
Preconfiguring packages ...
Selecting previously deselected package lsof.
(Reading database ... 
................
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 20076 files and directories currently installed.)
Unpacking lsof (from .../lsof_4.81.dfsg.1-1_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/lsof_4.81.dfsg.1-1_amd64.deb (--unpack):
 unable to create `/usr/bin/lsof.dpkg-new' (while processing `./usr/bin/lsof'): Permission denied
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Selecting previously deselected package libmd5-perl.
Unpacking libmd5-perl (from .../libmd5-perl_2.03-1_all.deb) ...
Selecting previously deselected package rkhunter.
Unpacking rkhunter (from .../rkhunter_1.3.4-5_all.deb) ...
dpkg: error processing /var/cache/apt/archives/rkhunter_1.3.4-5_all.deb (--unpack):
 unable to create `/usr/bin/rkhunter.dpkg-new' (while processing `./usr/bin/rkhunter'): Permission denied
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Selecting previously deselected package unhide.
Unpacking unhide (from .../unhide_20080519-4_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/unhide_20080519-4_amd64.deb (--unpack):
 unable to create `/usr/sbin/unhide-posix.dpkg-new' (while processing `./usr/sbin/unhide-posix'): Permission denied
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Processing triggers for man-db ...
Errors were encountered while processing:
 /var/cache/apt/archives/lsof_4.81.dfsg.1-1_amd64.deb
 /var/cache/apt/archives/rkhunter_1.3.4-5_all.deb
 /var/cache/apt/archives/unhide_20080519-4_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install.  Trying to recover:
Setting up libmd5-perl (2.03-1) ...

Building dependency tree... 0%

Building dependency tree... 50%

Building dependency tree... 50%

Building dependency tree       


Reading state information... 0%

...........
....................

I have removed some lines to reduce the text. All the error messages are in here though. My experience with linux is limited and i am not sure what the problem is or how it is to be resolved.

Thanks.


Response of dmesg | tail as asked by @Danny Staple

[15124905.180010] TCP: Peer 86.137.106.203:53633/80 unexpectedly shrunk window 4186622621:4186623965 (repaired)         
[15124906.180012] TCP: Peer 86.137.106.203:53633/80 unexpectedly shrunk window 4186622621:4186623965 (repaired)         
[15515559.123663] iftop uses obsolete (PF_INET,SOCK_PACKET)                                                             
[16976290.290013] eth0: no IPv6 routers present                                                                         
[16976291.180014] eth1: no IPv6 routers present                                                                         
[16984092.913895] EXT3-fs: Unrecognized mount option "-" or missing value                                               
[16984099.795068] EXT3-fs: Unrecognized mount option "-errors=remount-ro" or missing value                              
[16984368.841407] EXT3-fs: Unrecognized mount option "w" or missing value                                               
[16984422.110130] EXT3-fs: Unrecognized mount option "noerrors" or missing value                                        
[17249700.060009] TCP: Peer 81.159.138.220:63867/80 unexpectedly shrunk window 2200198177:2200201097 (repaired)
share|improve this question

migrated from stackoverflow.com Dec 30 '10 at 11:08

This question came from our site for professional and enthusiast programmers.

    
I tried to install by logging as root, that too didn't work. –  Srisa Dec 30 '10 at 10:27
add comment

3 Answers

The problem occurs where the dpkg wants to unpack your *.deb files, possibly a filesystem mount option problem:

Here is the error:

unable to create `/usr/bin/lsof.dpkg-new' (while processing `./usr/bin/lsof'): Permission denied

Could you please mount the filesystem without the ro option?

Hint:

mount / -o remount,rw

Where the / is your mount point (could be anything where /usr/bin belongs), possibly /usr/

share|improve this answer
    
This is a live server. So, i am not sure if i can use the command that you gave me. I don't want to bring down the server to install something. –  Srisa Dec 30 '10 at 10:41
    
It won't bring anything down, that's why the remount option, could you provide the output of the mount option to check? –  KARASZI István Dec 30 '10 at 10:47
    
output was too big to fit into the comment, posted it as answer –  Srisa Dec 30 '10 at 10:51
    
you can edit the question in this case –  KARASZI István Dec 30 '10 at 10:57
add comment

/dev/sda1 on / type ext3 (rw,noatime,errors=remount-ro)
proc on /proc type proc (rw)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type tmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
/dev/sda1 on /dev/.static/dev type ext3 (rw)

share|improve this answer
add comment

The packages that are having problems are in the package cache. Try doing this:

sudo apt-get clean

One other potential problem is that the mount point could be full. Have you tried doing a df?

share|improve this answer
    
I use aptitude. I tried sudo aptitude clean and then the install command. Still the same error. df shows 41G of free space –  Srisa Dec 30 '10 at 13:39
    
Looking at the error log above - the command is complaining about permissions writing to /usr/bin/lsof.dpkg-new. How about doing an ls -l of that file to see if it exists, what permissions it has etc. –  Danny Staple Dec 30 '10 at 13:47
    
There is no such file. –  Srisa Dec 31 '10 at 7:08
    
Okay - how about 'sudo ls -ld /usr/bin'? –  Danny Staple Dec 31 '10 at 16:07
    
drwxr-xr-x 2 root root 20480 Dec 28 23:04 /usr/bin –  Srisa Jan 3 '11 at 8:50
show 2 more comments

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.