Debian 9.5를 사용하여 새로 설치합니다. mysql-server를 설치하고 싶지만 종속성 문제가 있습니다.
sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mysql-server : Depends: default-mysql-server but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
apt-get install mysql-server default-mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
default-mysql-server : Depends: mariadb-server-10.1 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
sudo apt-get install mysql-server default-mysql-server mariadb-server-10.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
mariadb-server-10.1 : Depends: libdbi-perl but it is not going to be installed
Recommends: libhtml-template-perl but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
sudo apt-get install mysql-server default-mysql-server mariadb-server-10.1 libhtml-template-perl
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libhtml-template-perl : Depends: libcgi-pm-perl but it is not going to be installed or
perl (< 5.19) but 5.26.2-7 is to be installed
mariadb-server-10.1 : Depends: libdbi-perl but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
sudo apt-get install mysql-server default-mysql-server mariadb-server-10.1 libdbi-perl
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libdbi-perl : Depends: perlapi-5.24.1
E: Unable to correct problems, you have held broken packages.
편집 1 apt-cache policy
::
apt-cache policy
Package files:
100 /var/lib/dpkg/status
release a=now
500 http://security.debian.org/debian-security stretch/updates/contrib amd64 Packages
release v=9,o=Debian,a=stable,n=stretch,l=Debian-Security,c=contrib,b=amd64
origin security.debian.org
500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
release v=9,o=Debian,a=stable,n=stretch,l=Debian-Security,c=main,b=amd64
origin security.debian.org
500 http://deb.debian.org/debian stretch-updates/main amd64 Packages
release o=Debian,a=stable-updates,n=stretch-updates,l=Debian,c=main,b=amd64
origin deb.debian.org
500 http://deb.debian.org/debian stretch/main amd64 Packages
release v=9.5,o=Debian,a=stable,n=stretch,l=Debian,c=main,b=amd64
origin deb.debian.org
Pinned packages:
편집 2 apt policy perl perl-base
::
apt policy perl perl-base
perl:
Installed: 5.26.2-7
Candidate: 5.26.2-7
Version table:
*** 5.26.2-7 100
100 /var/lib/dpkg/status
5.24.1-3+deb9u4 500
500 http://deb.debian.org/debian stretch/main amd64 Packages
500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
perl-base:
Installed: 5.26.2-7
Candidate: 5.26.2-7
Version table:
*** 5.26.2-7 100
100 /var/lib/dpkg/status
5.24.1-3+deb9u4 500
500 http://deb.debian.org/debian stretch/main amd64 Packages
500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
이러한 종속성 문제를 해결하려면 어떻게 해야 합니까?
답변1
출력에 표시된 apt policy perl perl-base
대로지적통과요르단, 귀하의 시스템에는 Debian 9 버전이 아닌 Buster 버전의 Perl이 있습니다. 그러므로 여러분의 시스템은 실제로 데비안 9.5를 "새로 설치"한 것이 아닙니다. Perl은 데비안 설정의 매우 중요한 구성 요소이기 때문에 아마도 Buster 버전으로 업그레이드된 다른 패키지가 많이 있을 것입니다.
Perl 불일치로 인해 MySQL 패키지를 설치할 수 없습니다.
나는 이것이 최근에 설치되었다고 가정하고 있으므로 당신은 그것에 많은 것을 투자하지 않았습니다.재설치를 권장합니다아마도 이 경우 가장 좋은 솔루션일 것입니다. Debian 9와 Buster는 상당히 다르기 때문에 특히 Perl을 업그레이드하는 경우 롤백이 상당히 복잡해질 수 있습니다. 삭제 mc
만으로는 충분하지 않습니다.
앞으로는 안정 릴리스와 베타 릴리스를 혼합하지 마십시오. 패키지 사용을 방해하는 버그가 발생하면 버그를 신고하세요( reportbug mc
). 문제가 심각할 경우 안정적인 업데이트를 받을 수 있습니다. 백포트를 요청할 수도 있습니다. 그러면 mc
Debian 9용으로 재구축된 현재 Buster 버전이 제공됩니다.
답변2
허용된 솔루션을 기반으로 다음 명령을 성공적으로 실행했습니다.
wget http://ftp.debian.org/debian/pool/main/p/perl/perl-base_5.24.1-3+deb9u4_amd64.deb
sudo dpkg -i perl-base*deb
dpkg: warning: downgrading perl-base from 5.26.2-7 to 5.24.1-3+deb9u4
(Reading database ... 38749 files and directories currently installed.)
Preparing to unpack perl-base_5.24.1-3+deb9u4_amd64.deb ...
Unpacking perl-base (5.24.1-3+deb9u4) over (5.26.2-7) ...
Setting up perl-base (5.24.1-3+deb9u4) ...
Processing triggers for man-db (2.7.6.1-2) ...
sudo apt-get install mysql-server
sudo apt --fix-broken install
sudo apt autoremove
sudo apt-get install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
mysql-server is already the newest version (5.5.9999+default).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
결과:
dpkg -l perl-base
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=====================================================-===============================-===============================-===============================================================================================================
ii perl-base 5.24.1-3+deb9u4 amd64 minimal Perl system
dpkg -l mysql-server
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=====================================================-===============================-===============================-===============================================================================================================
ii mysql-server 5.5.9999+default amd64 MySQL database server binaries and system database setup [transitional]
답변3
sudo apt install mysql-server 패키지 목록 읽기... 완료 종속성 트리 구축
상태 정보 읽기... 완료 일부 패키지를 설치할 수 없습니다. 이는 불가능한 상황을 요청했거나 불안정한 배포판을 사용하는 경우 일부 필수 패키지가 아직 생성되지 않았거나 이동되었음을 의미할 수 있습니다. 다음 정보는 문제를 해결하는 데 도움이 될 수 있습니다.
다음 패키지에는 충족되지 않은 종속성이 있습니다. mysql-server : 의존하는 항목: mysql-server-8.0이지만 설치되지 않습니다. E: 문제를 수정할 수 없습니다. 패키지가 손상되었습니다. raja@raja-latitudee6400:~$ mysql 서버 기본 mysql 서버 bash: mysql 서버: 명령을 찾을 수 없습니다.