Pacchetto php7.2-mbstring dipendenze non soddisfatte in Ubuntu 18.04


8

Prova a installare php-mbstring per l'installazione di mediawiki.

già aggiunto dopo il primo tentativo di repository universo: pacchetto php7.2-mbstring mancante in Ubuntu 18.04

Ma mi fa passare un brutto momento Ecco i dettagli:

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.
  • aggiorna aggiungi informazioni richieste dai commenti
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

1
Mostraci l'output di quanto segue, per favore, vorrei vedere se avere diversi repository abilitati o disabilitati potrebbe essere la causa dei tuoi problemi, e questo ti aiuterà a far luce: apt-cache policy php7.2-common php7.2-mbstring (Inoltre, FYI, Universo è abilitato di default su Ubuntu 18.04)
Thomas Ward

@TiloBunt In quali fonti hai /etc/apt/sources.list? E stessa domanda per le fonti in /etc/apt/sources.list.d/*. Queste sono le fonti da cui ottieni tutti i tuoi pacchetti. Quindi assicurati che tutto vada bene. Ottieni il repository del pacchetto che vuoi installare e controlla se hai la sua fonte negli elenchi citati.
Socrate,

@ThomasWard e Socrates, hanno aggiunto informazioni alla mia domanda. fammi sapere se dovrei controllare qualcos'altro. È una nuova installazione
TiloBunt il

Risposte:


16

Ti mancano alcuni canali necessari da sources.list. Fallo sudo gedit /etc/apt/sources.liste fallo apparire così:

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

Salva ed esci. Quindi aggiorna il tuo repository:

sudo apt update

Quindi installare php-mbstring:

sudo apt install php7.2-mbstring

Questi comandi non hanno funzionato per me. L'errore è lo stesso. Ho dovuto scaricarlo http://security.ubuntu.com/ubuntu/pool/universe/p/php7.2/php7.2-mbstring_7.2.15-0ubuntu0.18.04.1_amd64.debe installarlo su dpkg -icomando
Redbob

Grazie per questa correzione, mi ci sono volute solo poche ore per capire che questa era la soluzione.
Jeff Lange,

0

Le informazioni del pacchetto che sono a aptconoscenza non sono aggiornate.

Usando lo rmadisonstrumento, possiamo vedere tutte le versioni dei php7.2-mbstringrepository:

 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

anche se sto solo mostrando gli oggetti Bionic qui.

Poiché il tuo sistema non è a conoscenza del più recente php7.2-mbstringnei repository di sicurezza o aggiornamenti, stai riscontrando una mancata corrispondenza della versione.

Esegui questo:

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

Ciò dovrebbe aiutare a riportare le versioni dove devono essere. (Nota che potresti voler usare dist-upgradeinvece upgradeche in modo che pacchetti come pacchetti kernel aggiornati vengano installati e aggiornati anche)


provato questo, ma stesso risultato.
TiloBunt,

1
Sembra che il tuo sistema non sia configurato correttamente allora. Mostraci l' apt-cache policyoutput dello stesso comando che ho chiesto nei commenti come modifica di nuovo alla tua domanda, perché sembra che i tuoi repository non vengano aggiornati
Thomas Ward

apprezzo il tuo aiuto. L'aggiunta del restrictedrisolto per ora e sto bene. Il sistema era una nuova installazione su VM, quindi non sono sicuro di come posso confondere la configurazione così velocemente ma avrebbe potuto essere. Saluti
TiloBunt
Utilizzando il nostro sito, riconosci di aver letto e compreso le nostre Informativa sui cookie e Informativa sulla privacy.
Licensed under cc by-sa 3.0 with attribution required.