0
votes

apt install php7.3 php7.3-common php7.3-cli

It returns this error:

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-common : Breaks: php7.3-common but 7.3.15-3 is to be installed php7.3 : Depends: libapache2-mod-php7.3 but it is not installable or php7.3-fpm but it is not installable or php7.3-cgi but it is not installable php7.3-cli : Depends: php7.3-json but it is not installable E: Unable to correct problems, you have held broken packages.

And when I try to install:

apt install php7.3-fpm

I have:

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-common : Breaks: php7.3-common but 7.3.15-3 is to be installed E: Unable to correct problems, you have held broken packages.

That's my source.list:

# Debian 11 (bullseye) deb http://deb.debian.org/debian/ bullseye main deb-src http://deb.debian.org/debian/ bullseye main

# Aggiornamenti di sicurezza per bullseye deb http://security.debian.org/debian-security bullseye-security main deb-src http://security.debian.org/debian-security bullseye-security main

# Aggiornamenti raccomandati per bullseye (abilitati solo dal rilascio in poi) deb http://deb.debian.org/debian/ bullseye-updates main deb-src http://deb.debian.org/debian/ bullseye-updates main

My system is a dist-upgrade from Buster. I cant figure out whats wrong.

UPDATE

it says: Reading package lists... Done E: The repository 'http://deb.debian.org/debian-security bullseye/updates 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.

2

2 Answers

1
votes

The deb-src lines in your sources.list are used to download only the sources package, a regular sources.list should contain the lines starting with deb , here is a good explanation from debian wiki:

Archive type

The first word on each line, deb or deb-src, indicates the type of archive. Deb indicates that the archive contains binary packages (deb), the pre-compiled packages that we normally use. Deb-src indicates source packages, which are the original program sources plus the Debian control file (.dsc) and the diff.gz containing the changes needed for packaging the program.

To solve the problem ,you need to adjust the content of your sources.list as follows (see sources.list example):

sudo apt edit-sources

Then past the following lines:

deb http://deb.debian.org/debian bullseye main
deb-src http://deb.debian.org/debian bullseye main

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

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

Then run:

sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
sudo apt autoremove

Install php*:

sudo apt install php7.3 php7.3-common php7.3-cli
0
votes

Install package dependencies

php7.3-common

trace them manually or try gdebi(apt install gdebi), it will fetch dependencies of apt packages.

Also unless you are testing release (bullseye) not recommended to install.