캐치 22 : apt-utils를 설치하려면 apt-utils가 필요합니까?


6

이 문제가 발생했을 때 다른 것을 설치하려고했습니다. 그래서 apt-utils를 설치하여 해결하려고했습니다. 그러나 apt-utils를 설치할 수 없었습니다. 왜냐하면 콘솔에 apt-utils가 없다고 알려줍니다.

root@napajohn:~# apt-get install apt-utils
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
  apt-utils
0 upgraded, 1 newly installed, 0 to remove and 28 not upgraded.
3 not fully installed or removed.
Need to get 0 B/129 kB of archives.
After this operation, 365 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  apt-utils
Install these packages without verification [y/N]? y
debconf: delaying package configuration, since apt-utils is not installed
Setting up dash (0.5.5.1-7.4em1) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 75.)
debconf: falling back to frontend: Readline
No diversion 'diversion of /usr/share/man/man1/sh.1.gz by dash', none removed.
This should never be reached
dpkg: error processing dash (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of bash:
 bash depends on dash (>= 0.5.5.1-2.2); however:
  Package dash is not configured yet.
dpkg: error processing bash (--configure):
 dependency problems - leaving unconfigured
configured to not write apport reports
                                      configured to not write apport reports
                                                                            Errors were encountered while processing:
 dash
 bash
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@napajohn:~#

나는 이것을 시도했다 : https://serverfault.com/questions/358943/what-does-debconf-delaying-package-configuration-since-apt-utils-is-not-insta

나는 이것을 시도했지만 나에게 그것은 apt-utils를 포함하지 않는다 : apt error : 즉시 구성을 수행 할 수 없었다

많은 양의 웹 검색을 수행 한 후에도 여전히 아이디어를 잃었습니다. 감사합니다!

달리는:

root@napajohn:~# cat /etc/debian_version
6.0.3
root@napajohn:~# uname -a
Linux napajohn 2.6.34 #4 Mon Oct 31 16:41:13 EDT 2011 armv7l GNU/Linux
root@napajohn:~#

2
시도 dpkg-reconfigure -a또는으로 원하는 패키지를 설치 dpkg -i를 다운로드하여 .deb데비안 패키지 아카이브에 웹 인터페이스에서.
Daniel Andersson

답변 주셔서 감사합니다, 다니엘 나는 그것을 즉시 보지 못했다. 그러나 나는 모든 것이 작동하도록했습니다. 평판이 낮아 아직 답변을 제출할 수 없습니다. 나는 6 시간 후에 그것을 할 것이다.
John E

@JohnE이 질문은 슈퍼 유저 나 유닉스와 리눅스에 적합합니다. 하나 또는. 알아 낸 다음 여기에 게시 했으므로 여기에 그대로 두겠습니다.
닌클

답변:


7

이 스레드 게시물 덕분 에이 문제를 해결했습니다 : http://lists.debian.org/debian-embedded/2011/11/msg00037.html

내가 사용한 프로세스 :

root@napajohn:~# cat /var/lib/dpkg/info/dash.preinst
#!/bin/bash
set -e

divert() {
        dfile=$1
        ltarget=$2
        div=$(dpkg-divert --list $dfile)
        distrib=${3:-$dfile.distrib}
        temp=$dfile.tmp
        if [ -z "$div" ]; then
                # This differs from dpkg-divert's --rename because we
                # first make a copy of $dfile (the file being diverted)
                # in $distrib. Then, a symlink to $ltarget is forcibly created
                # from $dfile; this is performed in two stages with an
                # intermediate temporary file as ln -sf is not atomic.
                # dpkg-divert's --rename direct equivalent would be:
                # mv $dfile $distrib -- but we could end up without a symlink
                if [ -e $dfile ]; then
                        cp -dp $dfile $distrib
                fi
                ln -sf $ltarget $temp
                mv -f $temp $dfile
                dpkg-divert --package dash --divert $distrib --add $dfile
        fi
}

# Divert the following files if no diversion exists already
# It is currently used to prevent the files collision between bash and
# dash: they both provide the files in the package.
divert /bin/sh dash
divert /usr/share/man/man1/sh.1.gz dash.1.gz \
        /usr/share/man/man1/sh.distrib.1.gz
root@napajohn:~# /var/lib/dpkg/info/dash.preinst install
ln: creating symbolic link `/usr/share/man/man1/sh.1.gz.tmp': No such file or directory
root@napajohn:~# mkdir -p /usr/share/man/man1
root@napajohn:~# /var/lib/dpkg/info/dash.preinst install
Adding 'diversion of /usr/share/man/man1/sh.1.gz to /usr/share/man/man1/sh.distrib.1.gz by dash'
root@napajohn:~# /var/lib/dpkg/info/dash.preinst install
root@napajohn:~# dpkg --configure -a
Setting up dash (0.5.5.1-7.4em1) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 75.)
debconf: falling back to frontend: Readline
Setting up bash (4.1-3em1) ...
update-alternatives: error: alternative path /usr/share/man/man7/bash-builtins.7.gz doesn't exist.
root@napajohn:~# apt-get install dialog
Reading package lists... Done
Building dependency tree... Done
The following NEW packages will be installed:
  dialog
0 upgraded, 1 newly installed, 0 to remove and 28 not upgraded.
Need to get 0 B/183 kB of archives.
After this operation, 516 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  dialog
Install these packages without verification [y/N]? y
debconf: delaying package configuration, since apt-utils is not installed
tar: ./control: time stamp 2010-11-27 17:03:26 is 344105762.627135945 s in the future
tar: ./md5sums: time stamp 2010-11-27 17:03:26 is 344105762.625823689 s in the future
tar: .: time stamp 2010-11-27 17:03:26 is 344105762.625457478 s in the future
Selecting previously deselected package dialog.
(Reading database ... 9114 files and directories currently installed.)
Unpacking dialog (from .../dialog_1.1-20100428-1em1_armel.deb) ...
Setting up dialog (1.1-20100428-1em1) ...
root@napajohn:~# dpkg --configure -a
root@napajohn:~# apt-get install apt-utils
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  apt-utils
0 upgraded, 1 newly installed, 0 to remove and 28 not upgraded.
Need to get 0 B/129 kB of archives.
After this operation, 365 kB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  apt-utils
Install these packages without verification [y/N]? y
debconf: delaying package configuration, since apt-utils is not installed
tar: ./control: time stamp 2011-06-28 19:49:06 is 362518839.816741658 s in the future
tar: ./shlibs: time stamp 2011-04-15 21:43:32 is 356132105.815368367 s in the future
tar: ./postinst: time stamp 2011-04-15 21:43:32 is 356132105.814819051 s in the future
tar: ./md5sums: time stamp 2011-06-28 19:49:06 is 362518839.814361287 s in the future
tar: ./postrm: time stamp 2011-04-15 21:43:33 is 356132106.813903523 s in the future
tar: .: time stamp 2011-06-28 19:49:06 is 362518839.813598348 s in the future
Selecting previously deselected package apt-utils.
(Reading database ... 9123 files and directories currently installed.)
Unpacking apt-utils (from .../apt-utils_0.8.10.3+squeeze1em1_armel.deb) ...
Setting up apt-utils (0.8.10.3+squeeze1em1) ...
root@napajohn:~# echo Hoorah!
Hoorah!

1
에 대해 +1 echo Hoorah!! 일반적으로 당신에게 소리칩니다.
Rob
당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.