
실수로 apt-get을 삭제했는데 다시 설치하는 데 문제가 있습니다.
내가 한 일은 다음과 같습니다.
dpkg -r apt (uninstalled apt-get)
apt.deb 파일을 다운로드하고 다시 설치하려고했습니다.
sudo dpkg -i apt_1.2.32ubuntu0.1_amd64.deb
나에게 다음과 같은 오류가 발생합니다.
Selecting previously unselected package aptitude:amd64.
(Reading database ... 200534 files and directories currently installed.)
Preparing to unpack aptitude_0.8.10-6ubuntu1_amd64.deb ...
Unpacking aptitude:amd64 (0.8.10-6ubuntu1) ...
dpkg: dependency problems prevent configuration of aptitude:amd64:
aptitude:amd64 depends on aptitude-common (= 0.8.10-6ubuntu1).
aptitude:amd64 depends on libboost-filesystem1.65.1.
aptitude:amd64 depends on libboost-iostreams1.65.1.
aptitude:amd64 depends on libboost-system1.65.1.
aptitude:amd64 depends on libcwidget3v5.
aptitude:amd64 depends on libncursesw5 (>= 6).
aptitude:amd64 depends on libsigc++-2.0-0v5 (>= 2.8.0).
aptitude:amd64 depends on libxapian30.
dpkg: error processing package aptitude:amd64 (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
aptitude:amd64
그런 다음 이것을 시도했습니다.
sudo dpkg -i --force-all apt_1.2.32ubuntu0.1_amd64.deb
그것은 나에게 다음과 같은 결과를 제공합니다.
Selecting previously unselected package apt:amd64.
(Reading database ... 200540 files and directories currently installed.)
Preparing to unpack apt_1.2.32ubuntu0.1_amd64.deb ...
Unpacking apt:amd64 (1.2.32ubuntu0.1) ...
dpkg: apt:amd64: dependency problems, but configuring anyway as you requested:
snapd (2.48+18.04) breaks apt (<< 1.6.3) and is installed.
Version of apt:amd64 to be configured is 1.2.32ubuntu0.1.
Setting up apt:amd64 (1.2.32ubuntu0.1) ...
Configuration file '/etc/apt/apt.conf.d/01-vendor-ubuntu', does not exist on system.
Installing new config file as you requested.
Configuration file '/etc/apt/apt.conf.d/01autoremove', does not exist on system.
Installing new config file as you requested.
Configuration file '/etc/cron.daily/apt-compat', does not exist on system.
Installing new config file as you requested.
Configuration file '/etc/kernel/postinst.d/apt-auto-removal', does not exist on system.
Installing new config file as you requested.
Configuration file '/etc/logrotate.d/apt', does not exist on system.
Installing new config file as you requested.
/etc/kernel/postinst.d/apt-auto-removal: 14: /etc/kernel/postinst.d/apt-auto-removal: apt-config: Exec format error
/etc/kernel/postinst.d/apt-auto-removal: 18: /etc/kernel/postinst.d/apt-auto-removal: apt-config: Exec format error
/etc/kernel/postinst.d/apt-auto-removal: 49: /etc/kernel/postinst.d/apt-auto-removal: apt-config: Exec format error
Created symlink /etc/systemd/system/timers.target.wants/apt-daily-upgrade.timer → /lib/systemd/system/apt-daily-upgrade.timer.
Created symlink /etc/systemd/system/timers.target.wants/apt-daily.timer → /lib/systemd/system/apt-daily.timer.
Processing triggers for libc-bin (2.27-3ubuntu1.3) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
이제 사용하려고 하면
sudo apt-get update
그것은 나에게 이것을 제공합니다 :
/usr/bin/apt-get: 1: /usr/bin/apt-get: ELF: not found
/usr/bin/apt-get: 1: /usr/bin/apt-get: @8�@8: not found
/usr/bin/apt-get: 2: /usr/bin/apt-get: ����: not found
/usr/bin/apt-get: 3: /usr/bin/apt-get: : not found
/usr/bin/apt-get: 3: /usr/bin/apt-get: cannot open ½���������hI��p�: No such file
rm�: not foundet: 3: /usr/bin/apt-get: c
/usr/bin/apt-get: 4: /usr/bin/apt-get: �7��: not found
�F�'�: /usr/bin/apt-get:
�
�J
n\���� \
Y[#�� �d��=
�: not found
/usr/bin/apt-get: 6: /usr/bin/apt-get: �C��+: not found
/usr/bin/apt-get: 16: /usr/bin/apt-get: Syntax error: "(" unexpected
우분투 18.04.5 LTS
답변1
apt
Ubuntu 18.04 버전이 아닌 Ubuntu 16.04 버전을 설치하려고 합니다 apt
.
이 페이지를 참조하십시오apt
(1.2.32우분투0.1). 페이지의 URL에 대한 이동 경로는 다음과 같습니다.
» 우분투 » 패키지 » xenial (16.04LTS) » 관리자 » apt
그것은 분명히 Ubuntu 16.04 버전입니다. 하지만 Ubuntu 18.04를 실행하고 있습니다. 그래서 당신은 얻을 필요가apt
(1.6.12우분투0.1) 그럴 수 있다.여기에서 발견. 다시 한 번 페이지의 URL에 대한 탐색경로를 살펴보세요.
» Ubuntu » 패키지 » bionic(18.04LTS) » admin » apt
다운로드 해여기에서 직접다음 명령을 실행하세요.
sudo dpkg --install apt_1.6.12ubuntu0.1_amd64.deb
그리고 당신은 단단해야합니다.