入出力エラー、何もインストールできない

入出力エラー、何もインストールできない

私のDebianサーバーに何か奇妙なことをしても、何もインストールできません。ロケールが破損していると出てきます。私はdpkgを再構築し、apt-getをクリーンアップし、インターネット上の他の多くのソリューションを使用して問題を解決しました。物をインストールしようとすると、次の結果が表示されます。

Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
  locales
The following packages will be upgraded:
  xxx yyy
xx upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 27.3 MB of archives.
After this operation, 19.3 MB disk space will be freed.
Do you want to continue? [Y/n]
Fetched 27.3 MB in 19s (1,396 kB/s)
(Reading database ... 45726 files and directories currently installed.)
Removing locales (2.19-18+deb8u2) ...
dpkg: error processing package locales (--remove):
 cannot remove '/usr/share/locale/locale.alias': Input/output error
Errors were encountered while processing:
 locales
E: Sub-process /usr/bin/dpkg returned an error code (1)
apt-get upgrade  10.60s user 2.89s system 40% cpu 32.969 total 

上記のエラーのため、ファイルを削除できません。
ロケールファイルを回復または再実行してみてください。locales is broken or not fully installed

コメントで提案したとおり:

root@bananapi ~ # dpkg --audit
The following packages are only half installed, due to problems during
installation.  The installation can probably be completed by retrying it;
the packages can be removed using dselect or dpkg --remove:
 locales              GNU C Library: National Language (locale) data [support]

これを試みると、次のエラーが発生します。

1 root@bananapi ~ # apt-get install locales                                                                                                                                                              :(
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  locales
1 upgraded, 0 newly installed, 0 to remove and 17 not upgraded.
1 not fully installed or removed.
Need to get 3,944 kB of archives.
After this operation, 395 kB of additional disk space will be used.
Get:1 http://security.debian.org/ jessie/updates/main locales all 2.19-18+deb8u3 [3,944 kB]
Fetched 3,944 kB in 1s (3,045 kB/s)
Preconfiguring packages ...
Selecting previously unselected package locales.
(Reading database ... 45727 files and directories currently installed.)
Preparing to unpack .../locales_2.19-18+deb8u3_all.deb ...
Unpacking locales (2.19-18+deb8u3) over (2.19-18+deb8u2) ...
dpkg: error processing archive /var/cache/apt/archives/locales_2.19-18+deb8u3_all.deb (--unpack):
 unable to make backup link of './usr/sbin/update-locale' before installing new version: Too many links
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/locales_2.19-18+deb8u3_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
apt-get install locales  5.53s user 1.97s system 34% cpu 21.697 total

ベストアンサー1

cannot remove '/usr/share/locale/locale.alias': Input/output error

これは包装システムの問題ではありません。リポジトリが破損しています。ストレージの破損した部分にアクセスする必要があるすべての操作は失敗します。この場合、アップグレードは破損したディレクトリのファイルを置き換える必要があるため、アップグレードは失敗します。

ストレージの損傷は悪い兆候です。ディスクを交換し、データの整合性を確認してください。

おすすめ記事