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.

This morning I'm trying to install RoR on my Ubuntu 10.04 and I followed some tutorial do some cmds like:

apt-get update
apt-get upgrade

and then , I can't not install any software anymore.

when I type apt-get -f install

    Preparing to replace bridge-utils 1.4-5ubuntu2 (using .../bridge-utils_1.5-2ubuntu1.1_i386.deb) ...
    /var/lib/dpkg/tmp.ci/preinst: 6: dpkg-maintscript-helper: not found
    dpkg: error processing /var/cache/apt/archives/bridge-utils_1.5-2ubuntu1.1_i386.deb (--unpack):
     subprocess new pre-installation script returned error exit status 127
    E: Sub-process /usr/bin/dpkg returned an error code (1)

or type apt-get install csh

root@www:/var/lib/dpkg# apt-get install csh
Reading package lists... Done
Building dependency tree
Reading state information... Done
csh is already the newest version.
The following packages were automatically installed and are no longer required:
  byobu iso-codes python-newt update-notifier-common python-apt cpu-checker
  wwwconfig-common libjs-mootools javascript-common
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  bridge-utils
The following packages will be upgraded:
  bridge-utils
1 upgraded, 0 newly installed, 0 to remove and 194 not upgraded.
14 not fully installed or removed.
Need to get 0B/31.4kB of archives.
After this operation, 4096B of additional disk space will be used.
Do you want to continue [Y/n]?
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = "en_US:en",
        LC_ALL = (unset),
        LANG = "en_US"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_MESSAGES to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
(Reading database ...
dpkg: warning: files list file for package `gcc-4.6-base' missing, assuming pack                                                                  age has no files currently installed.
(Reading database ... 44832 files and directories currently installed.)
Preparing to replace bridge-utils 1.4-5ubuntu2 (using .../bridge-utils_1.5-2ubun                                                                  tu1.1_i386.deb) ...
/var/lib/dpkg/tmp.ci/preinst: 6: dpkg-maintscript-helper: not found
dpkg: error processing /var/cache/apt/archives/bridge-utils_1.5-2ubuntu1.1_i386.                                                                  deb (--unpack):
 subprocess new pre-installation script returned error exit status 127
/var/lib/dpkg/tmp.ci/postrm: 6: dpkg-maintscript-helper: not found
dpkg: error while cleaning up:
 subprocess new post-removal script returned error exit status 127
Errors were encountered while processing:
 /var/cache/apt/archives/bridge-utils_1.5-2ubuntu1.1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

I don't know what should I do , I google whole day all the solutions don't work.

Like the following:

  1. sudo mv /var/lib/dpkg/info /var/lib/dpkg/info_old //现将info文件夹更名
  2. sudo mkdir /var/lib/dpkg/info //再新建一个新的info文件夹
  3. sudo apt-get update, apt-get -f install //不用解释了吧
  4. sudo mv /var/lib/dpkg/info/* /var/lib/dpkg/info_old //执行完上一步操作后会在新的info文件夹下生成一些文件,现将这些文件全部移到info_old文件夹下
  5. sudo rm -rf /var/lib/dpkg/info //把自己新建的info文件夹删掉
  6. sudo mv /var/lib/dpkg/info_old /var/lib/dpkg/info //把以前的info文件夹重新改回名字
share|improve this question
    
what aptitude commands did you execute above the apt-get -f install command? Why are you using -f? Where did you see you needed to repair broken dependencies? –  apesa Feb 24 '13 at 16:03
    
Also, do you switch between languages on your Ubuntu machine? –  apesa Feb 24 '13 at 16:08
add comment

migrated from stackoverflow.com Feb 26 '13 at 13:53

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

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.