Score:2

debian - packages have unmet dependencies

cn flag

i am having Debian 11, and i am trying to install some php libs like mysql:

command: sudo apt install php-mysql

result:

Reading package lists... Done
Building dependency tree... Done
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.4-mysql : Depends: php7.4-common (= 7.4.21-1+deb11u1) but 7.4.25-1+deb11u1 is to be installed
E: Unable to correct problems, you have held broken packages.

update

the result of apt show php-mysql

Package: php-mysql
Version: 2:7.4+76
Priority: optional
Section: php
Source: php-defaults (76)
Maintainer: Debian PHP Maintainers <[email protected]>
Installed-Size: 13.3 kB
Depends: php-common, php7.4-mysql
Download-Size: 6,360 B
APT-Sources: http://deb.debian.org/debian bullseye/main amd64 Packages
Description: MySQL module for PHP [default]
 This package provides a MySQL module for PHP.
 .
 PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used
 open source general-purpose scripting language that is especially suited
 for web development and can be embedded into HTML.
 .
 This package is a dependency package, which depends on Debian's default
 PHP version (currently 7.4).

and also

echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php7.list :

deb https://packages.sury.org/php/ bullseye main

result of sudo apt update

Hit:1 http://packages.microsoft.com/repos/code stable InRelease                
Hit:2 http://deb.debian.org/debian bullseye InRelease                          
Hit:3 https://repo.steampowered.com/steam stable InRelease                     
Get:4 https://packages.sury.org/php bullseye InRelease [6,841 B]               
Get:5 https://fasttrack.debian.net/debian-fasttrack bullseye-fasttrack InRelease [12.9 kB]
Hit:6 http://download.virtualbox.org/virtualbox/debian buster InRelease        
Get:7 https://fasttrack.debian.net/debian-fasttrack bullseye-backports-staging InRelease [12.9 kB]
Ign:8 http://deb.debian.org/debian bullseye-security InRelease
Err:4 https://packages.sury.org/php bullseye InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B188E2B695BD4743
Hit:9 http://deb.debian.org/debian bullseye-updates InRelease
Err:10 http://deb.debian.org/debian bullseye-security Release
  404  Not Found [IP: 199.232.82.132 80]
Reading package lists... Done                                                  
W: GPG error: https://packages.sury.org/php bullseye InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY B188E2B695BD4743
E: The repository 'https://packages.sury.org/php bullseye InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: The repository 'http://deb.debian.org/debian bullseye-security Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

the result of cat /etc/apt/sources.list:

deb http://deb.debian.org/debian/ bullseye main contrib non-free
deb-src http://deb.debian.org/debian/ bullseye main contrib non-free

deb http://deb.debian.org/debian/ bullseye-security main contrib non-free
deb-src http://deb.debian.org/debian/ bullseye-security main contrib non-free

deb http://deb.debian.org/debian/ bullseye-updates main contrib non-free
deb-src http://deb.debian.org/debian/ bullseye-updates main contrib non-free

deb https://fasttrack.debian.net/debian-fasttrack/ bullseye-fasttrack main contrib
deb https://fasttrack.debian.net/debian-fasttrack/ bullseye-backports-staging main contrib
djdomi avatar
za flag
could it be that you missed some repository that was before available?
mohamad zbib avatar
cn flag
how can i check it?
djdomi avatar
za flag
`apt show php-mysql`, as also `sudo apt install -y curl wget gnupg2 ca-certificates lsb-release apt-transport-https` followed by `echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/php7.list` and as last `apt update ` additionally show us your /etc/apt/sources.list and source.list.d content
mohamad zbib avatar
cn flag
@djdomi i hope to look at the details that i have added
djdomi avatar
za flag
However, fasttrack should not be used in an Production Envoiroment - why do you use that? Seems i forgot something `wget https://packages.sury.org/php/README.txt` followed by `bash README.txt` should fix the first - the second seems to that you cant resolve correctly one debian mirror
Score:0
cn flag

I have noticed the error:

Err:10 http://deb.debian.org/debian bullseye-security Release
404  Not Found [IP: 199.232.82.132 80]

Maybe You are not receiving security updates thanks to that.

There was a change in a directory name apparently

In /etc/apt/sources.list file you need to use new directory name. For example replace "/debian/" by "/debian-security/". If you do not know the right name, open the http address of the old repository, you may find the right name.

Then "sudo apt update && sudo apt upgrade" to apply changes/update.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.