質問: e:問題を修正できません。壊れたパッケージを抱えています 数日前にインストールしたubuntu 13.04を使用しています。 nodejsとnpmをインストールしようとしています。最初にコマンドラインからインストールしてからアンインストールしようとしました。その後、何かが壊れました。sudo apt-get install -f nodejs npm reading package lists... done building dependency tree reading state information... done some packages could not be installed. this may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of incoming. the following information may help to resolve the situation: the following packages have unmet dependencies: nodejs : conflicts: npm e: unable to correct problems, you have held broken packages. /etc/apt/sources.listの出力は次のとおりです。# deb cdrom:[ubuntu 13.04 _raring ringtail_ - release amd64 (20130424)]/ raring main restricted # see http://help.ubuntu.com/community/upgradenotes for how to upgrade to # newer versions of the distribution. deb http://in.archive.ubuntu.com/ubuntu/ raring main restricted deb-src http://in.archive.ubuntu.com/ubuntu/ raring main restricted ## major bug fix updates produced after the final release of the ## distribution. deb http://in.archive.ubuntu.com/ubuntu/ raring-updates main restricted deb-src http://in.archive.ubuntu.com/ubuntu/ raring-updates main restricted ## n.b. software from this repository is entirely unsupported by the ubuntu ## team. also, please note that software in universe will not receive any ## review or updates from the ubuntu security team. deb http://in.archive.ubuntu.com/ubuntu/ raring universe deb-src http://in.archive.ubuntu.com/ubuntu/ raring universe deb http://in.archive.ubuntu.com/ubuntu/ raring-updates universe deb-src http://in.archive.ubuntu.com/ubuntu/ raring-updates universe ## n.b. software from this repository is entirely unsupported by the ubuntu ## team, and may not be under a free licence. please satisfy yourself as to ## your rights to use the software. also, please note that software in ## multiverse will not receive any review or updates from the ubuntu ## security team. deb http://in.archive.ubuntu.com/ubuntu/ raring multiverse deb-src http://in.archive.ubuntu.com/ubuntu/ raring multiverse deb http://in.archive.ubuntu.com/ubuntu/ raring-updates multiverse deb-src http://in.archive.ubuntu.com/ubuntu/ raring-updates multiverse ## n.b. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## also, please note that software in backports will not receive any review ## or updates from the ubuntu security team. deb http://in.archive.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse deb-src http://in.archive.ubuntu.com/ubuntu/ raring-backports main restricted universe multiverse deb http://security.ubuntu.com/ubuntu raring-security main restricted deb-src http://security.ubuntu.com/ubuntu raring-security main restricted deb http://security.ubuntu.com/ubuntu raring-security universe deb-src http://security.ubuntu.com/ubuntu raring-security universe deb http://security.ubuntu.com/ubuntu raring-security multiverse deb-src http://security.ubuntu.com/ubuntu raring-security multiverse ## uncomment the following two lines to add software from canonical's ## 'partner' repository. ## this software is not part of ubuntu, but is offered by canonical and the ## respective vendors as a service to ubuntu users. # deb http://archive.canonical.com/ubuntu raring partner # deb-src http://archive.canonical.com/ubuntu raring partner ## this software is not part of ubuntu, but is offered by third-party ## developers who want to ship their latest software. deb http://extras.ubuntu.com/ubuntu raring main deb-src http://extras.ubuntu.com/ubuntu raring main /etc/apt/sources.list.d/*の出力は次のとおりです。deb http://ppa.launchpad.net/chris-lea/node.js/ubuntu raring main # deb-src http://ppa.launchpad.net/chris-lea/node.js/ubuntu raring main ### this file is automatically configured ### # you may comment out this entry, but any other modifications may be lost. deb http://dl.google.com/linux/chrome/deb/ stable main ### this file is automatically configured ### # you may comment out this entry, but any other modifications may be lost. deb http://dl.google.com/linux/chrome/deb/ stable main ### this file is automatically configured ### # you may comment out this entry, but any other modifications may be lost. deb http://dl.google.com/linux/chrome/deb/ stable main deb http://deb.opera.com/opera/ stable non-free deb http://deb.opera.com/opera/ stable non-free deb http://deb.opera.com/opera/ stable non-free deb http://deb.opera.com/opera/ stable non-free
回答: apt-getの代わりにaptitudeを使用してください。よりインテリジェントです。競合するパッケージのダウングレードを処理するだけでなく、推奨される多くの作業シナリオのどれを希望するかを尋ねる一連の推奨事項を作成します。sudo aptitude install mynewpackage マシンにまだ適性がない場合は、sudo apt-get install aptitude