Erro no "apt upgrade" no Linux Mint 21.2

Bom dia,

Estou enfrentando um problema no “sudo apt upgrade”, quando chamo esse comando ele retorna o seguinte erro:

Try `cp --help' for more information.
cp: Warning: the meaning of `-P' will change in the future to conform to POSIX.
Use `--parents' for the old meaning, and `--no-dereference' for the new one.
cp: when preserving paths, the destination must be a directory
Try `cp --help' for more information.
cp: Warning: the meaning of `-P' will change in the future to conform to POSIX.
Use `--parents' for the old meaning, and `--no-dereference' for the new one.
cp: when preserving paths, the destination must be a directory
Try `cp --help' for more information.
cp: Warning: the meaning of `-P' will change in the future to conform to POSIX.
Use `--parents' for the old meaning, and `--no-dereference' for the new one.
cp: when preserving paths, the destination must be a directory
Try `cp --help' for more information.
E: /usr/share/initramfs-tools/hooks/brltty failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.15.0-76-generic with 1.
dpkg: erro ao processar o pacote initramfs-tools (--configure):
 o subprocesso instalado, do pacote initramfs-tools, o script post-installation 
retornou erro do status de saída 1
Erros foram encontrados durante o processamento de:
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

Alguém sabe como posso resolvê-lo?

Tenta:

# dpkg --configure -a
# apt --fix-broken --fix-missing install
# apt autoclean && apt autoremove && apt clean
# apt update
# apt full-upgrade

Em cada etapa, fica de olho na saída do terminal. Se fores desinstalar algum programa relevante ou necessário para o sistema, responde que não, e não prossegue ao menos que saibas o que estás a fazer.

Se possível, manda mais detalhes. Tipo, tu tens algum repositório de terceiros habilitado?

Tentei os procedimentos ditos pelo amigo @glhrmprcp porém não obtive sucesso.

Aí analisei melhor e lembrei que há alguns dias atrás eu editei meu arquivo “cp” (dentro da pasta /bin) para que ele mostrasse a barra de progresso quando fosse copiar algum arquivo. Resolvi desfazer as alterações e chamei “apt upgrade” logo em seguida, que para minha felicidade o comando rodou normalmente.

Ou seja, era alguma inconsistência desse arquivo que estava zicando tudo.

Fica a dica caso aconteça com alguém. :call_me_hand:

Este tópico foi fechado automaticamente 3 dias depois da última resposta. Novas respostas não são mais permitidas.