
그래서 얼마 전 저는 Windows 10과 Linux Mint 18:Sarah를 사용하여 컴퓨터를 이중 부팅했습니다. Windows 10에서는 hiberfil.sys
Windows 재부팅 기능을 사용하면서 기본적으로(시스템 스냅샷 등을 저장하기 위해) 파일을 생성했습니다. 이로 인해 발생한 문제는 내 컴퓨터가 내 시스템 파티션을 관리하는 grub을 인식하지 못하고 즉시 Windows로 부팅되도록 만들었다는 것입니다.
"Boot-Repair"를 사용하여 이 문제를 해결했으므로 이제 두 시스템 파티션 모두에 액세스할 수 있습니다. 하지만 문제가 발생 하여 이제는 어떤 소프트웨어도 설치 하거나 수행 apt-get
할 수 없습니다.sudo apt-get install ___
sudo apt-get upgrade
깨진 것은 내 grub입니다. 또는 시스템에서는 grub2-common이라는 다른 버전의 grub을 기대하지만 대신 2.02~beta2-36ubuntu3.1 버전의 grub이 설치되어 있습니다.
이제 몇 가지 명령을 실행했을 때의 출력을 보여 드리겠습니다.
$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
grub-pc : Depends: grub2-common (= 2.02~beta2-36ubuntu3.2) but 2.02~beta2-36ubuntu3.1 is installed
grub2-common : Depends: grub-common (= 2.02~beta2-36ubuntu3.1) but 2.02~beta2-36ubuntu3.2 is installed
E: Unmet dependencies. Try using -f.
그래서 권장되는 명령을 시도해 보겠습니다.
$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
grub2-common
The following packages will be upgraded:
grub2-common
1 upgraded, 0 newly installed, 0 to remove and 244 not upgraded.
3 not fully installed or removed.
Need to get 0 B/511 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] yes
(Reading database ... 288732 files and directories currently installed.)
Preparing to unpack .../grub2-common_2.02~beta2-36ubuntu3.2_amd64.deb ...
Unpacking grub2-common (2.02~beta2-36ubuntu3.2) over (2.02~beta2-36ubuntu3.1) ...
dpkg: error processing archive /var/cache/apt/archives/grub2-common_2.02~beta2-36ubuntu3.2_amd64.deb (--unpack):
trying to overwrite '/usr/sbin/grub-install', which is also in package lupin-support 0.57
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/grub2-common_2.02~beta2-36ubuntu3.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
소프트웨어를 설치하려고 하면 어떻습니까? 바이러스 백신 소프트웨어를 설치하려고 합니다.
sudo apt-get install clamav
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
clamav : Depends: clamav-freshclam (>= 0.99.2+dfsg) but it is not going to be installed or
clamav-data
Depends: libclamav7 (>= 0.99~rc1) but it is not going to be installed
grub-pc : Depends: grub2-common (= 2.02~beta2-36ubuntu3.2) but 2.02~beta2-36ubuntu3.1 is to be installed
grub2-common : Depends: grub-common (= 2.02~beta2-36ubuntu3.1) but 2.02~beta2-36ubuntu3.2 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
다시 말하지만, grub과 동일한 문제입니다.
마지막으로 제가 하고 싶은 의견이 하나 더 있습니다. sudo apt-get
grub 저장소 업데이트를 포함하여 아무것도 설치할 수 없습니다.
아마도 적성의 상태가 어떤지 궁금하시죠?
sudo aptitude install clamav
The following NEW packages will be installed:
clamav clamav-base{a} clamav-freshclam{a} libclamav7{a} libllvm3.6v5{ab}
The following partially installed packages will be configured:
grub-pc{b} python-pyaudio python-simplejson
0 packages upgraded, 5 newly installed, 0 to remove and 245 not upgraded.
Need to get 9,109 kB of archives. After unpacking 36.8 MB will be used.
The following packages have unmet dependencies:
grub2-common : Depends: grub-common (= 2.02~beta2-36ubuntu3.1) but 2.02~beta2-36ubuntu3.2 is installed.
grub-pc : Depends: grub2-common (= 2.02~beta2-36ubuntu3.2) but 2.02~beta2-36ubuntu3.1 is installed and it is kept back.
libllvm3.6v5 : Conflicts: libllvm3.6 but 1:3.6-2ubuntu1~trusty1 is installed.
Conflicts: libllvm3.6:i386 but 1:3.6-2ubuntu1~trusty1 is installed.
The following actions will resolve these dependencies:
Remove the following packages:
1) grub-gfxpayload-lists
2) grub-pc
3) grub2-common
4) libllvm3.6
5) libllvm3.6:i386
Accept this solution? [Y/n/q/?] Y
The following NEW packages will be installed:
clamav clamav-base{a} clamav-freshclam{a} libclamav7{a} libllvm3.6v5{a}
The following packages will be REMOVED:
grub-gfxpayload-lists{a} grub-pc{a} grub2-common{a} libllvm3.6{a} libllvm3.6:i386{a}
The following partially installed packages will be configured:
python-pyaudio python-simplejson
0 packages upgraded, 5 newly installed, 5 to remove and 244 not upgraded.
Need to get 9,109 kB of archives. After unpacking 29.9 MB will be freed.
Do you want to continue? [Y/n/?] Y
[ ERR] Writing extended state information
E: Failed to execute process to save dpkg selections, dpkg or trying to execute it exited with status/errno: 2
E: failed to save selections to dpkg database
적성이 좀 더 좋아진 것 같습니다. 그러나 예를 두 번 선택한 후에도 여전히 소프트웨어를 설치하지 못합니다.
혼란스러운 상황을 어떻게 정리할 수 있나요?
답변1
이 오류도 발생했습니다.
E: Failed to execute process to save dpkg selections, dpkg or
trying to execute it exited with status/errno: 2
좋아, 이것은 necroposting이지만 다음과 같은 방법으로 해결했습니다.
- 현재 적절한 상태의 백업을 생성합니다(또한 계속 유지합니다).
- 백업 복사본을 현재로 복사합니다.
- 적절한 업데이트 받기
- 위에서 생성된 백업을 제거합니다.
명령 목록:
root@host# cd /var/lib/dpkg
root@host# cp status status.backup
root@host# cp status-old status-old.backup
root@host# cp status-old status
root@host# apt-get update
root@host# apt-get upgrade
root@host# rm status.backup
root@host# rm status-old.backup
도대체 적절한 데이터베이스가 손상된 이유는 내가 알 수 없는 일입니다. 일부 문자가 손상된 것 같습니다(예: "c"가 "@" 등이 됨). 일부 불량 RAM 모듈이 이 문제를 일으킬 수 있다고 생각하지만 모두 테스트를 거쳤습니다.
답변2
또한 오류가 발생했습니다.
E: Failed to execute process to save dpkg selections, dpkg or
trying to execute it exited with status/errno: 2
/var/lib/dpkg/available
제 경우에는 그게 빠졌다 는 것이 문제였습니다 . touch
누락된 파일이 수정되었습니다 . 사용 가능한 파일을 다시 빌드하는 것이 가능하지만 필수는 아닙니다.
답변3
먼저 Linux Mint 터미널에서 grub-common용 .deb를 가져옵니다.
wget http://archive.ubuntu.com/ubuntu/pool/main/g/grub2/grub-common_2.02-2ubuntu8_amd64.deb
그런 다음 파일의 압축을 풀고,
sudo dpkg -i grub-common_2.02-2ubuntu8_amd64.deb
grub-common에는 gettext-base, libc6, libdevmapper1.02.1, libfreetype6, libfuse2, liblzma5, lsb-base가 필요합니다.
.deb 파일입니다.
gettextbase:http://archive.ubuntu.com/ubuntu/pool/main/g/gettext/gettext-base_0.19.8.1-6_amd64.deb
libc6:http://archive.ubuntu.com/ubuntu/pool/main/g/glibc/libc6_2.27-3ubuntu1_amd64.deb
libdevmapper1.02.1:http://archive.ubuntu.com/ubuntu/pool/main/l/lvm2/libdevmapper1.02.1_1.02.145-4.1ubuntu3_amd64.deb
libfreetype6:http://archive.ubuntu.com/ubuntu/pool/main/f/freetype/libfreetype6_2.8.1-2ubuntu2_amd64.deb
libfuse2: http://archive.ubuntu.com/ubuntu/pool/main/f/fuse/libfuse2_2.9.7-1ubuntu1_amd64.deb
liblzma5:http://archive.ubuntu.com/ubuntu/pool/main/x/xz-utils/liblzma5_5.2.2-1.3_amd64.deb
lsb 기반:http://archive.ubuntu.com/ubuntu/pool/main/l/lsb/lsb-base_9.20170808ubuntu1_all.deb
모두 종속성이 있으며 일부는 사전 설치되어 있을 수 있고 일부는 설치가 필요할 수 있습니다.
오류가 있는 경우 알려주시면 해결책을 찾아보겠습니다.
답변4
이것이 더미 논리인지 확실하지 않습니다. 그러나 나는 이것을 시도했고 나에게 원활하게 작동했습니다.
sudo apt upgrade grub-common grub2-common