ubuntu15.04에 부분적으로 설치된 mysql-server-5.6을 설치하거나 제거하는 데 문제가 있습니다. 내가받는 오류는 다음과 같습니다.
$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
mysql-server-5.6
The following packages will be upgraded:
mysql-server-5.6
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
22 not fully installed or removed.
Need to get 0 B/5,501 kB of archives.
After this operation, 50.8 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Preconfiguring packages ...
Setting up mysql-common (5.6.24-0ubuntu2) ...
update-alternatives: error: alternative path /etc/mysql/my.cnf.fallback doesn't exist
dpkg: error processing package mysql-common (--configure):
subprocess installed post-installation script returned error exit status 2
Errors were encountered while processing:
mysql-common
localepurge: Disk space freed in /usr/share/locale: 0 KiB
localepurge: Disk space freed in /usr/share/man: 0 KiB
localepurge: Disk space freed in /usr/share/gnome/help: 0 KiB
localepurge: Disk space freed in /usr/share/omf: 0 KiB
localepurge: Disk space freed in /usr/share/doc/kde/HTML: 0 KiB
Total disk space freed by localepurge: 0 KiB
E: Sub-process /usr/bin/dpkg returned an error code (1)
누군가 나를 도와줄 수 있나요?
답변1
퍼지를 수행한 후 다시 설치해 보십시오.
sudo apt-get remove --purge mysql-\*
sudo apt-get install mysql-server mysql-client
2018년 9월 4일 업데이트:
MySQL 프로세스가 활성화되어 제거/설치하는 데 문제가 있는 경우 먼저 이 작업을 시도한 다음 위에서 시도할 수 있습니다.
sudo kill $(pgrep mysql)
답변2
나(리눅스 멍청한 놈)가 파헤쳐야 했던 아주 간단한 해결책은... 파일을 만드는 것입니다.
nano /etc/mysql/my.cnf.fallback
mysql-common 5.7.11-0ubuntu6 패키지의 기본 콘텐츠로 채웁니다.
#
# The MySQL database server configuration file.
#
# You can copy this to one of:
# - "/etc/mysql/my.cnf" to set global options,
# - "~/.my.cnf" to set user-specific options.
#
# One can use all long options that the program supports.
# Run program with --help to get a list of available options and with
# --print-defaults to see which it would actually understand and use.
#
# For explanations see
# http://dev.mysql.com/doc/mysql/en/server-system-variables.html
# This will be passed to all mysql clients
# It has been reported that passwords should be enclosed with ticks/quotes
# escpecially if they contain "#" chars...
# Remember to edit /etc/mysql/debian.cnf when changing the socket location.
# Here is entries for some specific programs
# The following values assume you have at least 32M ram
!includedir /etc/mysql/conf.d/
답변3
제거/재설치도 나에게 효과가 없었습니다. 다음 "해결책"을 찾았습니다.
/ mysql.cnf.fallback
에 대한 "제공된 파일"에 나열된 파일을 찾을 수 없으며 파일에 대한 추가 정보도 찾을 수 없습니다.mysql-server-5.6
mysql-client-5.6
나는 (이것이 상대적으로 덜 중요한 "대체" 구성 파일이었을 것이라고 추측) /etc/mysql/my.cnf
에 복사했습니다./etc/mysql/my.cnf.fallback
/etc/mysql/my.cnf
심볼릭 링크이므로 ls /etc/mysql
이제 다음이 표시됩니다.
my.cnf.fallback -> /etc/alternatives/my.cnf
my.cnf -> /etc/alternatives/my.cnf
그런 다음 패키지 설치가 오류 없이 완료되었습니다(아마도 "존재하지 않음" 문제가 "해결"되었기 때문입니다).
나는 (아직) 어떤 부작용도 겪지 않았습니다.
답변4
확인되었습니다. 주문이 중요합니다.
apt remove mysql-* mariadb-* --purge
apt install mysql-common
apt install mariadb-common
apt install mariadb-server