Skip to content

Instantly share code, notes, and snippets.

@stories2
Created May 3, 2017 14:23
Show Gist options
  • Select an option

  • Save stories2/78fbe98b05c72018ac5acb17debcb186 to your computer and use it in GitHub Desktop.

Select an option

Save stories2/78fbe98b05c72018ac5acb17debcb186 to your computer and use it in GitHub Desktop.

Ubuntu Package Manager Issue


Problem

  • Can't install packages

HOW TO FIX

  • Remove mysql data from /var/lib/dpkg/info/
  • Type apt-get -f install

LOG

패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다       
상태 정보를 읽는 중입니다... 완료
curl is already the newest version (7.47.0-1ubuntu2.2).
다음 패키지가 자동으로 설치되었지만 더 이상 필요하지 않습니다:
  linux-headers-4.4.0-64 linux-headers-4.4.0-64-generic linux-headers-4.4.0-70
  linux-headers-4.4.0-70-generic linux-image-4.4.0-64-generic linux-image-4.4.0-70-generic
  linux-image-extra-4.4.0-64-generic linux-image-extra-4.4.0-70-generic
Use 'sudo apt autoremove' to remove them.
0개 업그레이드, 0개 새로 설치, 0개 제거 및 67개 업그레이드 안 함.
2개를 완전히 설치하지 못했거나 지움.
이 작업 후 0 바이트의 디스크 공간을 더 사용하게 됩니다.
계속 하시겠습니까? [Y/n] y
mysql-server-5.7 (5.7.18-0ubuntu0.16.04.1) 설정하는 중입니다 ...
/var/lib/dpkg/info/mysql-server-5.7.postinst: line 143: /usr/share/mysql-common/configure-symlinks:No such file or directory
dpkg: error processing package mysql-server-5.7 (--configure):
 설치한 post-installation 스크립트 하위 프로세스가 오류 1번을 리턴했습니다
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server 패키지는 다음 패키지에 의존: mysql-server-5.7: 하지만:
 mysql-server-5.7 패키지는 아직 설정하지 않았습니다.

dpkg: error processing package mysql-server (--configure):
 의존성 문제 - 설정하지 않고 남겨둠
보고서를 작성하지 않습니다. 오류 메시지에 따르면 예전의 실패 때문에 생긴 부수적인 오류입니다.
                                                                                             처리하는데 오류가 발생했습니다:
 mysql-server-5.7
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
stories2@stories2-H8DM8-2:~$ sudo su
root@stories2-H8DM8-2:/home/stories2# cd /var/lib/dpkg/info/
root@stories2-H8DM8-2:/var/lib/dpkg/info# rm mysql-*
root@stories2-H8DM8-2:/var/lib/dpkg/info# rm mysql*
rm: cannot remove 'mysql*': No such file or directory
root@stories2-H8DM8-2:/var/lib/dpkg/info# ls -l | grep mysql
-rw-r--r-- 1 root root     173  2월 22 16:46 dbconfig-mysql.list
-rw-r--r-- 1 root root       0  2월 22 16:46 dbconfig-mysql.md5sums
-rw-r--r-- 1 root root    5229  4월 28 04:20 libmysqlclient-dev.list
-rw-r--r-- 1 root root    8688  4월 27 09:41 libmysqlclient-dev.md5sums
-rw-r--r-- 1 root root     340  4월 28 04:20 libmysqlclient20:amd64.list
-rw-r--r-- 1 root root     324  4월 27 09:41 libmysqlclient20:amd64.md5sums
-rw-r--r-- 1 root root      35  4월 27 09:31 libmysqlclient20:amd64.shlibs
-rw-r--r-- 1 root root    5703  4월 27 09:31 libmysqlclient20:amd64.symbols
-rw-r--r-- 1 root root      35  4월 27 09:31 libmysqlclient20:amd64.shlibs                                                                                                                       [128/188]
-rw-r--r-- 1 root root    5703  4월 27 09:31 libmysqlclient20:amd64.symbols
-rw-r--r-- 1 root root      60  4월 27 09:31 libmysqlclient20:amd64.triggers
-rw-r--r-- 1 root root     132  2월 22 16:46 php-mysql.list
-rw-r--r-- 1 root root      68  4월  5  2016 php-mysql.md5sums
-rw-r--r-- 1 root root     646  3월  3 13:07 php7.0-mysql.list
-rw-r--r-- 1 root root     637  3월  2 22:06 php7.0-mysql.md5sums
-rwxr-xr-x 1 root root     851  3월  2 22:04 php7.0-mysql.postinst
-rwxr-xr-x 1 root root     909  3월  2 22:04 php7.0-mysql.postrm
-rwxr-xr-x 1 root root     927  3월  2 22:04 php7.0-mysql.preinst
-rwxr-xr-x 1 root root      29  3월  2 22:04 php7.0-mysql.prerm
-rw-r--r-- 1 root root     137  3월  2 22:02 php7.0-mysql.triggers
-rw-r--r-- 1 root root    1621  4월 22 10:52 python-mysqldb.list
-rw-r--r-- 1 root root    2136  4월  5  2016 python-mysqldb.md5sums
-rwxr-xr-x 1 root root     162  4월  5  2016 python-mysqldb.postinst
-rwxr-xr-x 1 root root     263  4월  5  2016 python-mysqldb.prerm
root@stories2-H8DM8-2:/var/lib/dpkg/info# apt-get -f install
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다
상태 정보를 읽는 중입니다... 완료
다음 패키지가 자동으로 설치되었지만 더 이상 필요하지 않습니다:
  linux-headers-4.4.0-64 linux-headers-4.4.0-64-generic linux-headers-4.4.0-70
  linux-headers-4.4.0-70-generic linux-image-4.4.0-64-generic linux-image-4.4.0-70-generic
  linux-image-extra-4.4.0-64-generic linux-image-extra-4.4.0-70-generic
Use 'sudo apt autoremove' to remove them.
0개 업그레이드, 0개 새로 설치, 0개 제거 및 67개 업그레이드 안 함.
2개를 완전히 설치하지 못했거나 지움.
이 작업 후 0 바이트의 디스크 공간을 더 사용하게 됩니다.
mysql-server-5.7 (5.7.18-0ubuntu0.16.04.1) 설정하는 중입니다 ...
mysql-server (5.7.18-0ubuntu0.16.04.1) 설정하는 중입니다 ...
@shnam7
Copy link

shnam7 commented Jan 24, 2018

Thanks, this worked fine and I saved much time and efforts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment