AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • Início
  • system&network
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • Início
  • system&network
    • Recentes
    • Highest score
    • tags
  • Ubuntu
    • Recentes
    • Highest score
    • tags
  • Unix
    • Recentes
    • tags
  • DBA
    • Recentes
    • tags
  • Computer
    • Recentes
    • tags
  • Coding
    • Recentes
    • tags
Início / unix / Perguntas / 443376
Accepted
user3371854
user3371854
Asked: 2018-05-13 01:23:57 +0800 CST2018-05-13 01:23:57 +0800 CST 2018-05-13 01:23:57 +0800 CST

grub-pc está meio configurado no Debian jessie

  • 772

Ao instalar o novo kernel do Linux, tive alguns problemas com atualização autônoma no último mês

# cat /var/log/unattended-upgrades/unattended-upgrades-dpkg.log
Log started: 2018-05-02  00:33:09
Lettura dei changelog...
/usr/bin/locale: 1: /usr/bin/locale: %!PS-Adobe-3.0: not found
/usr/bin/locale: 2: /usr/bin/locale: Syntax error: word unexpected 
(expecting ")")
Preconfigurazione dei pacchetti in corso
Selezionato il pacchetto linux-image-3.16.0-6-amd64 non precedentemente  
selezionato.
(Lettura del database... 207164 file e directory attualmente installati.)
Preparativi per estrarre .../linux-image-3.16.0-6-amd64_3.16.56- 
1_amd64.deb...
/usr/bin/locale: 1: /usr/bin/locale: %!PS-Adobe-3.0: not found
/usr/bin/locale: 2: /usr/bin/locale: Syntax error: word unexpected 
(expecting ")")
Estrazione di linux-image-3.16.0-6-amd64 (3.16.56-1)...
Preparativi per estrarre .../linux-image- 
amd64_3.16+63+deb8u2_amd64.deb...
Estrazione di linux-image-amd64 (3.16+63+deb8u2) su (3.16+63+deb8u1)...
Preparativi per estrarre .../linux-libc-dev_3.16.56-1_amd64.deb...
Estrazione di linux-libc-dev:amd64 (3.16.56-1) su (3.16.51-3+deb8u1)...
Configurazione di linux-image-3.16.0-6-amd64 (3.16.56-1)...
/usr/bin/locale: 1: /usr/bin/locale: %!PS-Adobe-3.0: not found
/usr/bin/locale: 2: /usr/bin/locale: Syntax error: word unexpected 
(expecting ")")
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-3.16.0-6-amd64
/etc/kernel/postinst.d/zz-update-grub:
/usr/bin/gettext: 1: /usr/bin/gettext: %!PS-Adobe-3.0: not found
/usr/bin/gettext: 2: /usr/bin/gettext: Syntax error: word unexpected 
(expecting ")")
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 
2
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux- 
image-3.16.0-6-amd64.postinst line 634.
dpkg: errore nell'elaborare il pacchetto linux-image-3.16.0-6-amd64 (-- 
configure):
il sottoprocesso installato script di post-installation ha restituito lo 
stato di errore 1
dpkg: problemi con le dipendenze impediscono la configurazione di linux- 
image-amd64:
linux-image-amd64 dipende da linux-image-3.16.0-6-amd64; comunque:
Il pacchetto linux-image-3.16.0-6-amd64 non è ancora configurato.

dpkg: errore nell'elaborare il pacchetto linux-image-amd64 (--configure):
problemi con le dipendenze - lasciato non configurato
Configurazione di linux-libc-dev:amd64 (3.16.56-1)...
Si sono verificati degli errori nell'elaborazione:
linux-image-3.16.0-6-amd64
linux-image-amd64
Error in function: 
Log ended: 2018-05-02  00:36:46

Log started: 2018-05-05  13:26:51
Lettura dei changelog...
/usr/bin/locale: 1: /usr/bin/locale: %!PS-Adobe-3.0: not found
/usr/bin/locale: 2: /usr/bin/locale: Syntax error: word unexpected 
(expecting ")")
(Lettura del database... 210939 file e directory attualmente installati.)
Preparativi per estrarre .../libmad0_0.15.1b-8+deb8u1_amd64.deb...
Estrazione di libmad0:amd64 (0.15.1b-8+deb8u1) su (0.15.1b-8)...
Configurazione di linux-image-3.16.0-6-amd64 (3.16.56-1)...
/usr/bin/locale: 1: /usr/bin/locale: %!PS-Adobe-3.0: not found
/usr/bin/locale: 2: /usr/bin/locale: Syntax error: word unexpected 
(expecting ")")
vmlinuz(/boot/vmlinuz-3.16.0-6-amd64
) points to /boot/vmlinuz-3.16.0-6-amd64
(/boot/vmlinuz-3.16.0-6-amd64) -- doing nothing at 
/var/lib/dpkg/info/linux-image-3.16.0-6-amd64.postinst line 263.
initrd.img(/boot/initrd.img-3.16.0-6-amd64
) points to /boot/initrd.img-3.16.0-6-amd64
(/boot/initrd.img-3.16.0-6-amd64) -- doing nothing at 
/var/lib/dpkg/info/linux-image-3.16.0-6-amd64.postinst line 263.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-3.16.0-6-amd64
/etc/kernel/postinst.d/zz-update-grub:
/usr/bin/gettext: 1: /usr/bin/gettext: %!PS-Adobe-3.0: not found
/usr/bin/gettext: 2: /usr/bin/gettext: Syntax error: word unexpected 
(expecting ")")
 run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 
2
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux- 
image-3.16.0-6-amd64.postinst line 634.
dpkg: errore nell'elaborare il pacchetto linux-image-3.16.0-6-amd64 (-- 
configure):
il sottoprocesso installato script di post-installation ha restituito lo 
stato di errore 1
dpkg: problemi con le dipendenze impediscono la configurazione di linux- 
image-amd64:
linux-image-amd64 dipende da linux-image-3.16.0-6-amd64; comunque:
Il pacchetto linux-image-3.16.0-6-amd64 non è ancora configurato.

dpkg: errore nell'elaborare il pacchetto linux-image-amd64 (--configure):
problemi con le dipendenze - lasciato non configurato
Configurazione di libmad0:amd64 (0.15.1b-8+deb8u1)...
Elaborazione dei trigger per libc-bin (2.19-18+deb8u10)...
Si sono verificati degli errori nell'elaborazione:
linux-image-3.16.0-6-amd64
linux-image-amd64
Error in function: 
Log ended: 2018-05-05  13:28:47

Log started: 2018-05-06  10:01:20
Lettura dei changelog...
/usr/bin/locale: 1: /usr/bin/locale: %!PS-Adobe-3.0: not found
/usr/bin/locale: 2: /usr/bin/locale: Syntax error: word unexpected 
(expecting ")")
Preconfigurazione dei pacchetti in corso
(Lettura del database... 210939 file e directory attualmente installati.)
Preparativi per estrarre .../tzdata_2018e-0+deb8u1_all.deb...
Estrazione di tzdata (2018e-0+deb8u1) su (2018d-0+deb8u1)...
Configurazione di tzdata (2018e-0+deb8u1)...
/usr/bin/locale: 1: /usr/bin/locale: %!PS-Adobe-3.0: not found
/usr/bin/locale: 2: /usr/bin/locale: Syntax error: word unexpected 
(expecting ")")

Current default time zone: 'Europe/Rome'
Local time is now:      Sun May  6 10:01:48 CEST 2018.
Universal Time is now:  Sun May  6 08:01:48 UTC 2018.
Run 'dpkg-reconfigure tzdata' if you wish to change it.

Configurazione di linux-image-3.16.0-6-amd64 (3.16.56-1)...
/usr/bin/locale: 1: /usr/bin/locale: %!PS-Adobe-3.0: not found
/usr/bin/locale: 2: /usr/bin/locale: Syntax error: word unexpected 
(expecting ")")
vmlinuz(/boot/vmlinuz-3.16.0-6-amd64
) points to /boot/vmlinuz-3.16.0-6-amd64
 (/boot/vmlinuz-3.16.0-6-amd64) -- doing nothing at 
/var/lib/dpkg/info/linux-image-3.16.0-6-amd64.postinst line 263.
initrd.img(/boot/initrd.img-3.16.0-6-amd64
) points to /boot/initrd.img-3.16.0-6-amd64
(/boot/initrd.img-3.16.0-6-amd64) -- doing nothing at 
/var/lib/dpkg/info/linux-image-3.16.0-6-amd64.postinst line 263.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-3.16.0-6-amd64
/etc/kernel/postinst.d/zz-update-grub:
/usr/bin/gettext: 1: /usr/bin/gettext: %!PS-Adobe-3.0: not found
/usr/bin/gettext: 2: /usr/bin/gettext: Syntax error: word unexpected 
(expecting ")")
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 
2
Failed to process /etc/kernel/postinst.d at /var/lib/dpkg/info/linux- 
image-3.16.0-6-amd64.postinst line 634.
dpkg: errore nell'elaborare il pacchetto linux-image-3.16.0-6-amd64 (-- 
configure):
il sottoprocesso installato script di post-installation ha restituito lo 
stato di errore 1
dpkg: problemi con le dipendenze impediscono la configurazione di linux- 
image-amd64:
linux-image-amd64 dipende da linux-image-3.16.0-6-amd64; comunque:
Il pacchetto linux-image-3.16.0-6-amd64 non è ancora configurato.

dpkg: errore nell'elaborare il pacchetto linux-image-amd64 (--configure):
problemi con le dipendenze - lasciato non configurato
Si sono verificati degli errori nell'elaborazione:
linux-image-3.16.0-6-amd64
linux-image-amd64
Error in function: 
Log ended: 2018-05-06  10:04:18

Depois disso, isso corrigiu meu problema, tentei limpar e reinstalar o grub2 e, depois de seguir as etapas, obtive isso

# dpkg --configure -a 
Configurazione di grub-pc (2.02~beta2-22+deb8u1)...
/usr/bin/locale: 1: /usr/bin/locale: %!PS-Adobe-3.0: not found
/usr/bin/locale: 2: /usr/bin/locale: Syntax error: word unexpected 
(expecting ")")
/usr/bin/locale: 1: /usr/bin/locale: %!PS-Adobe-3.0: not found
/usr/bin/locale: 2: /usr/bin/locale: Syntax error: word unexpected 
(expecting ")")
Installing for i386-pc platform.
Installazione completata, nessun errore segnalato.
/usr/bin/gettext: 1: /usr/bin/gettext: %!PS-Adobe-3.0: not found
/usr/bin/gettext: 2: /usr/bin/gettext: Syntax error: word unexpected 
(expecting ")")
dpkg: errore nell'elaborare il pacchetto grub-pc (--configure):
il sottoprocesso installato script di post-installation ha restituito lo 
stato di errore 2
Si sono verificati degli errori nell'elaborazione:

Minha preocupação é que, se o conflito não for grub e a reinstalação do grub não funcionar, não haverá como inicializar. Também não resolvi pelo chroot, apenas o reparo do grub não funciona. Meu arquivo de status dpkg me diz no grub-pc

Package: grub-pc
Status: install ok half-configured
Priority: optional
Section: admin
Installed-Size: 514
Maintainer: GRUB Maintainers <[email protected]>
Architecture: amd64
Multi-Arch: foreign
Source: grub2
Version: 2.02~beta2-22+deb8u1
Replaces: grub, grub-common (<= 1.97~beta2-1), grub-coreboot, grub-efi-$
Depends: debconf (>= 0.5) | debconf-2.0, grub-common (= 2.02~beta2-22+d$
Conflicts: grub (<< 0.97-54), grub-coreboot, grub-efi-amd64, grub-efi-i$
Conffiles:
/etc/kernel/postinst.d/zz-update-grub 269828d3b8e5bfb266c58fb0a00abcd5
/etc/kernel/postrm.d/zz-update-grub 269828d3b8e5bfb266c58fb0a00abcd5
...

Outras informações:

# uname -r
3.16.0-6-amd64
# apt-cache policy grub-pc
grub-pc:
Installato: 2.02~beta2-22+deb8u1
Candidato:  2.02~beta2-22+deb8u1
Tabella versione:
*** 2.02~beta2-22+deb8u1 0
500 http://ftp.uk.debian.org/debian/ jessie/main amd64 Packages
500 http://security.debian.org/ jessie/updates/main amd64 Packages
100 /var/lib/dpkg/status
# ls -al /vmlinuz*
lrwxrwxrwx 1 root root 27 mag  2 00:35 /vmlinuz -> boot/vmlinuz-3.16.0-6- 
amd64
lrwxrwxrwx 1 root root 27 gen 26 13:30 /vmlinuz.old -> boot/vmlinuz- 
3.16.0-5-amd64
# ls -a /initrd.img*
/initrd.img  /initrd.img.old
# ls -al /boot
totale 62164
drwxr-xr-x  3 root root     4096 mag 11 11:35 .
drwxr-xr-x 22 root root     4096 mag 11 14:20 ..
-rw-r--r--  1 root root   157756 dic 14 22:27 config-3.16.0-4-amd64
-rw-r--r--  1 root root   157786 gen  9 12:42 config-3.16.0-5-amd64
-rw-r--r--  1 root root   157842 mag  8 19:36 config-3.16.0-6-amd64
drwxr-xr-x  5 root root     4096 mag 12 10:47 grub
-rw-r--r--  1 root root 15164265 mag  7 11:27 initrd.img-3.16.0-4-amd64
-rw-r--r--  1 root root 15164783 gen 26 13:31 initrd.img-3.16.0-5-amd64
-rw-r--r--  1 root root 15310597 mag 11 11:35 initrd.img-3.16.0-6-amd64
-rw-r--r--  1 root root  2684316 dic 14 22:27 System.map-3.16.0-4-amd64
-rw-r--r--  1 root root  2683305 gen  9 12:42 System.map-3.16.0-5-amd64
-rw-r--r--  1 root root  2683087 mag  8 19:36 System.map-3.16.0-6-amd64
-rw-r--r--  1 root root  3137712 dic 14 22:25 vmlinuz-3.16.0-4-amd64
-rw-r--r--  1 root root  3139776 gen  9 12:40 vmlinuz-3.16.0-5-amd64
-rw-r--r--  1 root root  3170464 mag  8 19:34 vmlinuz-3.16.0-6-amd64
# df -h
File system     Dim. Usati Dispon. Uso% Montato su
/dev/sda1        46G   21G     24G  47% /
udev             10M     0     10M   0% /dev
tmpfs           401M  6,0M    395M   2% /run
tmpfs          1001M   28M    973M   3% /dev/shm
tmpfs           5,0M  4,0K    5,0M   1% /run/lock
tmpfs          1001M     0   1001M   0% /sys/fs/cgroup
/dev/sda2       180G   34G    137G  20% /home
tmpfs           201M   12K    201M   1% /run/user/1000
/dev/sdb1       3,8G  3,8G       0 100% /media/stefano/Debian 8.0.0 amd64 
1
# df -i
File system       Inode IUsati  ILiberi IUso% Montato su
/dev/sda1       3055616 448579  2607037   15% /
udev             253925    424   253501    1% /dev
tmpfs            256068    604   255464    1% /run
tmpfs            256068    129   255939    1% /dev/shm
tmpfs            256068      4   256064    1% /run/lock
tmpfs            256068     13   256055    1% /sys/fs/cgroup
/dev/sda2      11968512 320153 11648359    3% /home
tmpfs            256068     18   256050    1% /run/user/1000
/dev/sdb1             0      0        0     - /media/stefano/Debian 8.0.0 
amd64 1

Editar 1

Meu arquivo de localidade

# locale
/usr/bin/locale: riga 1: fg: nessun controllo dei job
/usr/bin/locale: riga 2: errore di sintassi vicino al token non atteso 
"ImageMagick"
/usr/bin/locale: riga 2: `%%Creator: (ImageMagick)'
# cat /etc/default/locale 
#  File generated by update-locale
LANG="it_IT.UTF-8"
# gettext -d coreutils -s "write error"/usr/bin/gettext: riga 1: fg: 
nessun controllo dei job
/usr/bin/gettext: riga 2: errore di sintassi vicino al token non atteso 
"ImageMagick"
/usr/bin/gettext: riga 2: `%%Creator: (ImageMagick)'
debian grub2
  • 1 1 respostas
  • 486 Views

1 respostas

  • Voted
  1. Best Answer
    telcoM
    2018-05-13T03:19:54+08:002018-05-13T03:19:54+08:00

    Parece que seus comandos /usr/bin/localee /usr/bin/gettextestão encontrando algo que se parece com um cabeçalho de documento PostScript e isso está causando alguns erros. Esses erros podem ou não ser a causa raiz de seus problemas, mas definitivamente estão interferindo em outras funcionalidades do sistema.

    Você tem algo estranho em /etc/default/locale, talvez? Ele deve conter apenas shdefinições e/ou comentários de variáveis ​​-style.

    O que acontece se você correr locale? Ele deve exibir suas configurações de localidade atuais e nenhuma mensagem de erro.

    Ou se você correr gettext -d coreutils -s "write error"? Ele deve gerar uma versão traduzida da mensagem "erro de gravação", de acordo com suas configurações de localidade atuais.

    Ou talvez um arquivo PostScript tenha encontrado seu caminho para o diretório do catálogo de mensagens? Então este comando pode encontrá-lo:

    find /usr/share/locale -type f -exec file {} \+ |grep -E -v 'GNU (gettext )?message catalog'
    

    O comando deve identificar quaisquer arquivos em /usr/share/locale que não sejam arquivos de catálogo de mensagens. Se a filesaída do seu comando também for traduzida, talvez seja necessário prefixar esse comando com LC_ALL=Cpara ter mensagens tme em inglês padrão dos EUA, de modo que a string de pesquisa exclua corretamente os arquivos do catálogo de mensagens da saída.


    Descobriu-se que your /usr/bin/localee aparentemente também /usr/bin/gettextforam substituídos por arquivos PostScript criados pelo ImageMagick. Isso soa como possível corrupção do sistema de arquivos, ou talvez um "oops" com os comandos do ImageMagick durante a execução como root.

    Para reparar seu /usr/bin/localee /usr/bin/gettext, execute este comando:

    apt-get install --reinstall libc-bin gettext-base
    

    Isso reinstalará todos os arquivos do pacote libc-bine gettext-basesem remover nenhum dos pacotes que dependem deles primeiro. Isso deve corrigir pelo menos algumas das mensagens de erro originais. Em seguida, você pode tentar executar dpkg --configure -anovamente para ver se essa foi a verdadeira causa raiz de todo o problema ou se ainda há mais coisas que precisam ser corrigidas.

    A possibilidade de corrupção do sistema de arquivos me faz pensar que você deve verificar dmesg | lessa saída: há algo que se pareça com um erro de disco?

    Diz smartctl -a /dev/<your system disk device>que o disco passa nas verificações de integridade SMART internas? O comando gera muitas informações, mas a parte importante deve ficar assim:

    === START OF READ SMART DATA SECTION ===
    SMART overall-health self-assessment test result: PASSED
    

    Se não disser "PASSED", seu disco está falhando e deve ser substituído.

    Mesmo se smartctlachar que o disco está bom, um backup completo e uma verificação completa do sistema de arquivos podem ser uma boa ideia. Se precisar de ajuda com a verificação do sistema de arquivos, abra uma nova pergunta para isso.

    • 2

relate perguntas

  • Configuração do GRUB para reconhecer diferentes ambientes de desktop (instalações) da mesma distribuição Linux

  • astyle não altera a formatação do arquivo de origem

  • Recebendo e-mail em um novo Debian fresco

  • Debian Stretch: gnome-software segfault em libgs_plugin_systemd-updates.so

  • Como digitar ü no Pinyin IME?

Sidebar

Stats

  • Perguntas 205573
  • respostas 270741
  • best respostas 135370
  • utilizador 68524
  • Highest score
  • respostas
  • Marko Smith

    Como exportar uma chave privada GPG e uma chave pública para um arquivo

    • 4 respostas
  • Marko Smith

    ssh Não é possível negociar: "nenhuma cifra correspondente encontrada", está rejeitando o cbc

    • 4 respostas
  • Marko Smith

    Como podemos executar um comando armazenado em uma variável?

    • 5 respostas
  • Marko Smith

    Como configurar o systemd-resolved e o systemd-networkd para usar o servidor DNS local para resolver domínios locais e o servidor DNS remoto para domínios remotos?

    • 3 respostas
  • Marko Smith

    Como descarregar o módulo do kernel 'nvidia-drm'?

    • 13 respostas
  • Marko Smith

    apt-get update error no Kali Linux após a atualização do dist [duplicado]

    • 2 respostas
  • Marko Smith

    Como ver as últimas linhas x do log de serviço systemctl

    • 5 respostas
  • Marko Smith

    Nano - pule para o final do arquivo

    • 8 respostas
  • Marko Smith

    erro grub: você precisa carregar o kernel primeiro

    • 4 respostas
  • Marko Smith

    Como baixar o pacote não instalá-lo com o comando apt-get?

    • 7 respostas
  • Martin Hope
    rocky Como exportar uma chave privada GPG e uma chave pública para um arquivo 2018-11-16 05:36:15 +0800 CST
  • Martin Hope
    Wong Jia Hau ssh-add retorna com: "Erro ao conectar ao agente: nenhum arquivo ou diretório" 2018-08-24 23:28:13 +0800 CST
  • Martin Hope
    Evan Carroll status systemctl mostra: "Estado: degradado" 2018-06-03 18:48:17 +0800 CST
  • Martin Hope
    Tim Como podemos executar um comando armazenado em uma variável? 2018-05-21 04:46:29 +0800 CST
  • Martin Hope
    Ankur S Por que /dev/null é um arquivo? Por que sua função não é implementada como um programa simples? 2018-04-17 07:28:04 +0800 CST
  • Martin Hope
    user3191334 Como ver as últimas linhas x do log de serviço systemctl 2018-02-07 00:14:16 +0800 CST
  • Martin Hope
    Marko Pacak Nano - pule para o final do arquivo 2018-02-01 01:53:03 +0800 CST
  • Martin Hope
    Kidburla Por que verdadeiro e falso são tão grandes? 2018-01-26 12:14:47 +0800 CST
  • Martin Hope
    Christos Baziotis Substitua a string em um arquivo de texto enorme (70 GB), uma linha 2017-12-30 06:58:33 +0800 CST
  • Martin Hope
    Bagas Sanjaya Por que o Linux usa LF como caractere de nova linha? 2017-12-20 05:48:21 +0800 CST

Hot tag

linux bash debian shell-script text-processing ubuntu centos shell awk ssh

Explore

  • Início
  • Perguntas
    • Recentes
    • Highest score
  • tag
  • help

Footer

AskOverflow.Dev

About Us

  • About Us
  • Contact Us

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve