A solução foi retirar o cartão e corrigi-lo com fsck
em outro computador. Muito simples, sugerido por EightBitTony.
Eu fiz algo estranho ao meu servidor debian e agora não consigo instalar nada. Diz, esse local está quebrado. Eu tentei consertá-lo reconfigurando o dpkg, limpando o apt-get e muitas outras soluções da internet. Quando tento instalar coisas, obtenho:
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
Não consigo remover este arquivo devido a esse erro mencionado anteriormente.
Tentando corrigir ou refazer o arquivo de localidade, diz que locales is broken or not fully installed
Como sugerido no comentário:
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]
Tentei fazer isso, me dá esse erro:
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
cannot remove '/usr/share/locale/locale.alias': Input/output error
Isso não é um problema com o sistema de empacotamento. O armazenamento está corrompido. Tudo o que requer acesso a parte corrompida do armazenamento falha. Nesse caso, a atualização exige a substituição de um arquivo em um diretório corrompido, para que ele falhe.
O armazenamento corrompido é um mau sinal. Substitua o seu disco e verifique a integridade dos seus dados.