Atualizei meu sistema para o Debian bookworm e o processo pareceu prosseguir normalmente, mas terminou com alguns erros. Quando tento usar o apt para resolver o problema, acabo com uma tela cheia do seguinte erro:
grep: symbol lookup error: grep: undefined symbol: pcre2_set_compile_extra_options_8
Parece que qualquer tentativa de usar grep resulta nesse erro, não importa quão básico seja o comando. Então, suponho que grep esteja de alguma forma quebrado neste sistema agora, o que dificulta qualquer esforço para repará-lo usando apt ou dpkg, por exemplo:
$ sudo apt install -f
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up initramfs-tools (0.142+deb12u1) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-6.1.0-31-amd64 (6.1.128-1) ...
/etc/kernel/postinst.d/dracut:
dracut: Generating /boot/initrd.img-6.1.0-31-amd64
grep: symbol lookup error: grep: undefined symbol: pcre2_set_compile_extra_options_8
[... 6 more times ...]
grep: symbol lookup error: grep: undefined symbol: pcre2_set_compile_extra_options_8
dracut: Disabling early microcode, because kernel does not support it. CONFIG_MICROCODE_[AMD|INTEL]!=y
grep: symbol lookup error: grep: undefined symbol: pcre2_set_compile_extra_options_8
[... 27 more times ...]
grep: symbol lookup error: grep: undefined symbol: pcre2_set_compile_extra_options_8
The default plymouth plugin () doesn't exist
grep: symbol lookup error: grep: undefined symbol: pcre2_set_compile_extra_options_8
[... 41 more times ...]
grep: symbol lookup error: grep: undefined symbol: pcre2_set_compile_extra_options_8
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-6.1.0-31-amd64
grep: symbol lookup error: grep: undefined symbol: pcre2_set_compile_extra_options_8
grep: symbol lookup error: grep: undefined symbol: pcre2_set_compile_extra_options_8
grep: symbol lookup error: grep: undefined symbol: pcre2_set_compile_extra_options_8
W: zstd compression (CONFIG_RD_ZSTD) not supported by kernel, using gzip
grep: symbol lookup error: grep: undefined symbol: pcre2_set_compile_extra_options_8
E: gzip compression (CONFIG_RD_GZIP) not supported by kernel
update-initramfs: failed for /boot/initrd.img-6.1.0-31-amd64 with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-6.1.0-31-amd64 (--configure):
installed linux-image-6.1.0-31-amd64 package post-installation script subprocess returned error exit status 1
Processing triggers for initramfs-tools (0.142+deb12u1) ...
update-initramfs: Generating /boot/initrd.img-6.1.0-31-amd64
grep: symbol lookup error: grep: undefined symbol: pcre2_set_compile_extra_options_8
grep: symbol lookup error: grep: undefined symbol: pcre2_set_compile_extra_options_8
grep: symbol lookup error: grep: undefined symbol: pcre2_set_compile_extra_options_8
W: zstd compression (CONFIG_RD_ZSTD) not supported by kernel, using gzip
grep: symbol lookup error: grep: undefined symbol: pcre2_set_compile_extra_options_8
E: gzip compression (CONFIG_RD_GZIP) not supported by kernel
update-initramfs: failed for /boot/initrd.img-6.1.0-31-amd64 with 1.
dpkg: error processing package initramfs-tools (--configure):
installed initramfs-tools package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
linux-image-6.1.0-31-amd64
initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
$ apt policy grep libpcre2-8-0
grep:
Installed: 3.8-5
Candidate: 3.8-5
Version table:
*** 3.8-5 500
500 https://deb.debian.org/debian bookworm/main amd64 Packages
100 /var/lib/dpkg/status
libpcre2-8-0:
Installed: 10.42-1
Candidate: 10.42-1
Version table:
*** 10.42-1 500
500 https://deb.debian.org/debian bookworm/main amd64 Packages
100 /var/lib/dpkg/status
$ ldd /bin/grep
linux-vdso.so.1 (0x00007fff81ff6000)
libpcre2-8.so.0 => /usr/local/lib/libpcre2-8.so.0 (0x00007fa6c7800000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fa6c761f000)
/lib64/ld-linux-x86-64.so.2 (0x00007fa6c7c7e000)
$ LD_DEBUG=all grep 2>&1 | busybox grep pcre2_set_compile_extra_options_
155549: symbol=pcre2_set_compile_extra_options_8; lookup in file=grep [0]
155549: symbol=pcre2_set_compile_extra_options_8; lookup in file=/usr/local/lib/libpcre2-8.so.0 [0]
155549: symbol=pcre2_set_compile_extra_options_8; lookup in file=/lib/x86_64-linux-gnu/libc.so.6 [0]
155549: symbol=pcre2_set_compile_extra_options_8; lookup in file=/lib64/ld-linux-x86-64.so.2 [0]
155549: grep: error: symbol lookup error: undefined symbol: pcre2_set_compile_extra_options_8 (fatal)
grep: symbol lookup error: grep: undefined symbol: pcre2_set_compile_extra_options_8
$dpkg -S {/usr,}/lib/x86_64-linux-gnu/libpcre2-8*
libpcre2-dev:amd64: /usr/lib/x86_64-linux-gnu/libpcre2-8.a
libpcre2-dev:amd64: /usr/lib/x86_64-linux-gnu/libpcre2-8.so
libpcre2-8-0:amd64: /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0
libpcre2-8-0:amd64: /usr/lib/x86_64-linux-gnu/libpcre2-8.so.0.11.2
dpkg-query: no path found matching pattern /lib/x86_64-linux-gnu/libpcre2-8.a
dpkg-query: no path found matching pattern /lib/x86_64-linux-gnu/libpcre2-8.so
dpkg-query: no path found matching pattern /lib/x86_64-linux-gnu/libpcre2-8.so.0
dpkg-query: no path found matching pattern /lib/x86_64-linux-gnu/libpcre2-8.so.0.11.2
$ (cd / && md5sum -c < /var/lib/dpkg/info/libpcre2-8-0:amd64.md5sums)
usr/lib/x86_64-linux-gnu/libpcre2-8.so.0.11.2: OK
usr/share/doc/libpcre2-8-0/README.Debian: OK
usr/share/doc/libpcre2-8-0/changelog.Debian.gz: OK
usr/share/doc/libpcre2-8-0/changelog.gz: OK
usr/share/doc/libpcre2-8-0/copyright: OK
O problema parece esotérico e meus esforços para encontrar uma solução foram improdutivos. Alguém pode me ajudar?