본문 바로가기
컴퓨터 활용/리눅스 활용

E: Sub-process /usr/bin/dpkg returned an error code (1)

by 호군 2011. 6. 10.
반응형
링크 : http://funcrush.pe.kr/117


apt-get으로 패키지를 설치할 때 패키지가 깨지거나 하는 등의 문제로 아래의 에러를 내며 설치가 되지 않는 경우가 종종 생긴다.
E: Sub-process /usr/bin/dpkg returned an error code (1)


아래는 설치하려는 패키지의 파일이 다른 패키지에도 포함되어 있어 덮어씌우기를 해야하는 상황이다.

root@2zii:~# apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
libkdepim4-kde4
The following NEW packages will be installed:
libkdepim4-kde4
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
25 not fully installed or removed.
Need to get 544kB of archives.
After this operation, 1946kB of additional disk space will be used.
Do you want to continue [Y/n]? y
WARNING: The following packages cannot be authenticated!
libkdepim4-kde4
Install these packages without verification [y/N]? y
Get:1 http://ppa.launchpad.net hardy/main libkdepim4-kde4 4:4.0.83-0ubuntu1~hardy1~ppa2 [544kB]
Fetched 544kB in 3s (151kB/s)
(Reading database ... 155090 files and directories currently installed.)
Unpacking libkdepim4-kde4 (from .../libkdepim4-kde4_4%3a4.0.83-0ubuntu1~hardy1~ppa2_amd64.deb) ...
dpkg: error processing /var/cache/apt/archives/libkdepim4-kde4_4%3a4.0.83-0ubuntu1~hardy1~ppa2_amd64.deb (--unpack):
trying to overwrite `/usr/lib/kde4/share/icons/oxygen/32x32/actions/appointment-new.png', which is also in package kde-icons-oxygen
Errors were encountered while processing:
/var/cache/apt/archives/libkdepim4-kde4_4%3a4.0.83-0ubuntu1~hardy1~ppa2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


이럴 땐 패키지 파일이 있는 디렉토리로 이동해 아래처럼 강제로 덮어씌우는 옵션을 줘서 설치한다.

root@2zii:/var/cache/apt/archives# dpkg -i --force-overwrite libkdepim4-kde4_4%3a4.0.83-0ubuntu1~hardy1~ppa2_amd64.deb

반응형