Problems installing packages with aptitude

Discussion in 'Server Operation' started by gish, Jul 1, 2010.

  1. gish

    gish New Member

    Hello,
    I've been struggling with this problem for a while now and haven't found a solution so far. The thing is that I can't install any packages on my VPS, since I'm not allowed to write to /usr/sbin. What's throwing me off the most is that I have not write permissions as root either. The output looks like the following
    Code:
    # apt-get install clamav-daemon
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following packages were automatically installed and are no longer required:
      ttf-dejavu-extra emacs23-bin-common emacs23-common ttf-dejavu
    Use 'apt-get autoremove' to remove them.
    Suggested packages:
      daemon clamav-docs
    The following packages will be upgraded:
      clamav-daemon
    1 upgraded, 0 newly installed, 0 to remove and 433 not upgraded.
    2 not fully installed or removed.
    Need to get 0B/397kB of archives.
    After this operation, 12.3kB of additional disk space will be used.
    (Reading database ... 48700 files and directories currently installed.)
    Preparing to replace clamav-daemon 0.95.1+dfsg-2 (using .../clamav-daemon_0.96.1+dfsg-1_i386.deb) ...
    Unpacking replacement clamav-daemon ...
    dpkg: error processing /var/cache/apt/archives/clamav-daemon_0.96.1+dfsg-1_i386.deb (--unpack):
     failed to delete '/usr/sbin/clamd.dpkg-new': Permission denied
    Processing triggers for man-db ...
    Errors were encountered while processing:
     /var/cache/apt/archives/clamav-daemon_0.96.1+dfsg-1_i386.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    
    I tried removing the 'i' attribute from /usr/sbin
    Code:
    # chattr -i /usr/sbin
    However, it didn't lead to any success.

    The attributes of /usr/sbin are:
    Code:
    # lsattr /usr/
    ------------------- /usr/share
    ------------------- /usr/src
    --------------I---- /usr/include
    --------------I---- /usr/bin
    ------------------- /usr/games
    ------------------- /usr/X11R6
    ------------------- /usr/local
    --------------I---- /usr/lib
    ------------------- /usr/nsbin
    suS-iadAc---------- /usr/sbin
    
    I seriously need to get this fixed asap. Would really appreciate if someone could come up with a solution.
     

Share This Page