
내 Raspberry Pi에서 "sudo apt-get dist-upgrade"를 실행하는 중에 사용자 입력을 기다리는 동안 SSH 연결이 재설정되었습니다. 나는 화면에서 달리고 있지 않았습니다. 마지막 몇 줄은 다음과 같았습니다.
Installing new version of config file /etc/init.d/procps ...
Configuration file '/etc/sysctl.conf'
==> Modified (by you or by a script) since installation.
==> Package distributor has shipped an updated version.
What would you like to do about it ? Your options are:
Y or I : install the package maintainer's version
N or O : keep your currently-installed version
D : show the differences between the versions
Z : start a shell to examine the situation
The default action is to keep your current version.
*** sysctl.conf (Y/I/N/O/D/Z) [default=N] ? Connection reset by <ip>
"ps"는 여전히 이전 apt-get 프로세스가 실행 중임을 보여줍니다...
$ ps -aux | grep apt
root 2375 0.0 0.3 6008 1636 ? S 03:03 0:00 sudo apt-get dist-upgrade
root 2376 0.0 6.2 33428 27872 ? S 03:03 0:18 apt-get dist-upgrade
/var/cache/apt/archives에 1.1G가 있고 apt-get dist-upgrade에 대한 새로운 시도를 성공적으로 시도할 수 없습니다.
$ sudo apt-get dist-upgrade
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
이제 어떻게 해야 하나요? 진행 중인 dist-upgrade를 재개할 수 있는 방법이 있나요? 그렇지 않다면 취소하고 다시 시도하는 좋은 방법은 무엇입니까?
답변1
kill
apt-get을 실행한 후 다시 실행하면 dpkg --configure --pending
이전에 이미 설치된 패키지를 구성할 수 있습니다 .
시스템이 손상되어 계속할 수 없는 경우 apt-get을 사용하여 문제를 해결할 수 있습니다.
apt-get --fix-broken install
Unix & Linux에서도 비슷한 질문을 확인하세요.https://unix.stackexchange.com/questions/46534/how-to-safely-resume-an-aptitude-dist-upgrade-after-ssh-timeout.