проблема с дпкг

Когда я попытался установить виртуальную коробку с помощью sudo apt-get install vitualbox-qt, она не удалась, он сказал:

dpkg: warning: files list file for package 'firefox-locale-en' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libasan4:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'gcc-7' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libbinutils:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'binutils-common:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libmpx2:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'gcc-8-base:i386' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'libstdc++6:i386' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'binutils-x86-64-linux-gnu' missing; assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
 files list file for package 'libstdc++-7-dev:amd64' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)

Когда я переустанавливал dpkg, снова возникла та же проблема.

Как решить эту проблему?

Я следую инструкции здесь:

Файл списка файлов для пакета отсутствует - предупреждение dpkg

запустить команду sudo apt-get autoclean, но не работать.

Я не уверен, имеет ли это отношение к моему текущему переходу Ubuntu на новые SSD.

Затем я пишу скрипт. Мой скрипт выглядит так: 1111:

#!/bin/sh
arch="$(dpkg --print-architecture)"
for p in
  firefox-locale-en libasan4:amd64 gcc-7 libbinutils:amd64 binutils-common:amd64 libmpx2:amd64 gcc-8-base:i386 libstdc++6:i386 binutils-x86-64-linux-gnu libstdc++-7-dev:amd64
do
  find /var/cache/apt/archives -type f -name "${p}_*_${arch}.deb" -exec dpkg-deb --fsys-tarfile {} \; -quit | tar t | cut -f2- -d. | sed 's|^/$|/.|;s|/$||' | sudo tee "/var/lib/dpkg/info/$p.list" > /dev/null 
done
sudo chmod -R a+r /var/lib/dpkg/info

. Но теперь проблема в том, что:

./tt.sh: line 4: syntax error near unexpected token `firefox-locale-en'
./tt.sh: line 4: `  firefox-locale-en libasan4:amd64 gcc-7 libbinutils:amd64 binutils-common:amd64 libmpx2:amd64 gcc-8-base:i386 libstdc++6:i386 binutils-x86-64-linux-gnu libstdc++-7-dev:amd64'

Затем я изменяю его на:

#!/bin/sh
arch="$(dpkg --print-architecture)"
for p in firefox-locale-en libasan4:amd64 gcc-7 libbinutils:amd64 binutils-common:amd64 libmpx2:amd64 gcc-8-base:i386 libstdc++6:i386 binutils-x86-64-linux-gnu libstdc++-7-dev:amd64
do
  find /var/cache/apt/archives -type f -name "${p}_*_${arch}.deb" -exec dpkg-deb --fsys-tarfile {} \; -quit | tar t | cut -f2- -d. | sed 's|^/$|/.|;s|/$||' | sudo tee "/var/lib/dpkg/info/$p.list" > /dev/null 
done
sudo chmod -R a+r /var/lib/dpkg/info

Но теперь он говорит:

find: ‘/var/cache/apt/archives/partial’: Permission denied
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
find: ‘/var/cache/apt/archives/partial’: Permission denied
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
find: ‘/var/cache/apt/archives/partial’: Permission denied
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
find: ‘/var/cache/apt/archives/partial’: Permission denied
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
find: ‘/var/cache/apt/archives/partial’: Permission denied
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
find: ‘/var/cache/apt/archives/partial’: Permission denied
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
find: ‘/var/cache/apt/archives/partial’: Permission denied
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors

Затем я запускаю его в корне он говорит:

tar: Exiting with failure status due to previous errors
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors

Затем я пошел посмотреть, что не так с /var/cache/apt/archives/partial Я обнаружил странную вещь, почти все пачки в этом сгибе сопровождаются .FAILED в качестве суффикса. Например:

libreoffice-l10n-en-gb_1%3a6.0.7-0ubuntu0.18.04.4_all.deb.FAILED
libreoffice-l10n-en-za_1%3a6.0.7-0ubuntu0.18.04.4_all.deb.FAILED
libreoffice-l10n-zh-cn_1%3a6.0.7-0ubuntu0.18.04.4_all.deb.FAILED
libreoffice-math_1%3a6.0.7-0ubuntu0.18.04.5_amd64.deb.FAILED
libreoffice-ogltrans_1%3a6.0.7-0ubuntu0.18.04.5_amd64.deb.FAILED
libreoffice-pdfimport_1%3a6.0.7-0ubuntu0.18.04.5_all.deb.FAILED
libreoffice-style-breeze_1%3a6.0.7-0ubuntu0.18.04.5_all.deb.FAILED
libreoffice-style-galaxy_1%3a6.0.7-0ubuntu0.18.04.5_all.deb.FAILED

Все следуют с FAILED в качестве суффикса. И нет firefox-locale-en libasan4:amd64 gcc-7 libbinutils:amd6 и т. Д. В этом сгибе. Затем я сравнил его с моей исходной системой. Я обнаружил, что основное отличие состоит в том, что оригинальная система имеет те firefox-locale-en libasan4:amd64 gcc-7 libbinutils:amd6, но моя новая система не есть те.

Произошла плохая вещь. Я покрыл / var / cache / apt / архивы / частичные моей старой системой. Даже если я сделаю резервную копию, ошибка изменилась.

Теперь я бегу sudo rm /var/lib/dpkg/info/binutils* Затем бегу sudo apt-get install virtualbox-qt Он сказал:

dpkg: warning: files list file for package 'binutils-common:amd64' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'binutils' missing; assuming package has no files currently installed
dpkg: warning: files list file for package 'binutils-x86-64-linux-gnu' missing; assuming package has no files currently installed
dpkg: unrecoverable fatal error, aborting:
 files list file for package 'libgomp1:amd64' contains empty filename
E: Sub-process /usr/bin/dpkg returned an error code (2)

1
задан 19 June 2019 в 18:20

0 ответов

Другие вопросы по тегам:

Похожие вопросы: