태그 보관물: 18.04

18.04

우분투 18.04의 패키지 php7.2-mbstring unmet dependencies 18.04에서 패키지 php7.2-mbstring이

설치하려고 PHP-mbstring을 미디어 위키 설치에.

첫 번째 시도 유니버스 저장소 후에 이미 추가됨 : Ubuntu 18.04에서 패키지 php7.2-mbstring이 누락되었습니다.

그러나 어려움을 겪습니다.

usertilo@myserver4:~$ sudo apt-get install php-mbstring
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:
 php-mbstring : Depends: php7.2-mbstring but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

usertilo@myserver4:~$ sudo apt-get install php7.2-mbstring
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:
 php7.2-mbstring : Depends: php7.2-common (= 7.2.3-1ubuntu1) but 7.2.7-0ubuntu0.18.04.2 is to be installed
E: Unable to correct problems, you have held broken packages.

usertilo@myserver4:~$ uname -a
Linux myserver4 4.15.0-29-generic #31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

usertilo@myserver4:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.1 LTS
Release:        18.04
Codename:       bionic

usertilo@myserver4:~$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

usertilo@server4:~$ sudo apt-get install php7.2-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
php7.2-common is already the newest version (7.2.7-0ubuntu0.18.04.2).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
  • 의견에서 요청한 정보 추가 업데이트
usertilo@myserver4:~$ sudo apt-cache policy php7.2-common php7.2-mbstring
php7.2-common:
  Installed: 7.2.7-0ubuntu0.18.04.2
  Candidate: 7.2.7-0ubuntu0.18.04.2
  Version table:
 *** 7.2.7-0ubuntu0.18.04.2 500
        500 http://archive.ubuntu.com/ubuntu bionic-security/main amd64 Packages
        500 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     7.2.3-1ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
php7.2-mbstring:
  Installed: (none)
  Candidate: 7.2.3-1ubuntu1
  Version table:
     7.2.3-1ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages

usertilo@myserver4:~$ cat /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu bionic main universe
deb http://archive.ubuntu.com/ubuntu bionic-security main
# deb-src http://archive.ubuntu.com/ubuntu bionic universe
deb http://archive.ubuntu.com/ubuntu bionic-updates main

usertilo@myserver4:~$ cat /etc/apt/sources.list.d/*
cat: '/etc/apt/sources.list.d/*': No such file or directory



답변

에서 필요한 채널이 누락되었습니다 sources.list. 수행 sudo gedit /etc/apt/sources.list하고 다음과 같이합니다

deb http://archive.ubuntu.com/ubuntu bionic main multiverse restricted universe
deb http://archive.ubuntu.com/ubuntu bionic-security main multiverse restricted universe
deb http://archive.ubuntu.com/ubuntu bionic-updates main multiverse restricted universe

저장하고 종료. 그런 다음 저장소를 업데이트하십시오.

sudo apt update

그런 다음 설치하십시오 php-mbstring.

sudo apt install php7.2-mbstring


답변

apt알고있는 패키지 정보가 오래되었습니다.

rmadison도구를 사용하면 php7.2-mbstringrepos에서 모든 버전을 볼 수 있습니다 .

 php7.2-mbstring | 7.2.3-1ubuntu1         | bionic/universe          | amd64, arm64, armhf, i386, ppc64el, s390x
 php7.2-mbstring | 7.2.7-0ubuntu0.18.04.2 | bionic-security/universe | amd64, arm64, armhf, i386, ppc64el, s390x
 php7.2-mbstring | 7.2.7-0ubuntu0.18.04.2 | bionic-updates/universe  | amd64, arm64, armhf, i386, ppc64el, s390x

여기서는 Bionic 아이템 만 보여줍니다.

시스템이 최신 php7.2-mbstring보안 또는 업데이트 저장소에 대해 알지 못 하므로 버전이 일치하지 않습니다.

이것을 실행하십시오 :

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install php7.2-mbstring

이렇게하면 버전을 필요한 곳으로 되돌릴 수 있습니다. ( 업데이트 된 커널 패키지와 같은 패키지가 설치 및 업그레이드되도록 dist-upgrade대신 사용할 수도 upgrade있습니다)


답변