Description
This article describes how to solve the error "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."
Scope
FortiClient EMS 7.4.0 + Ubuntu 22.04.
Solution
In Standalone EMS 7.4.0 installation, an error like the following may be encountered:
PLEASE READ: If you like my work and want to give me a little motivation, please consider donating: https://deb.sury.org/#donate
More info: https://launchpad.net/~ondrej/+archive/ubuntu/apache2
Adding repository.
Adding deb entry to /etc/apt/sources.list.d/ondrej-ubuntu-apache2-jammy.list
Adding disabled deb-src entry to /etc/apt/sources.list.d/ondrej-ubuntu-apache2-jammy.list
Adding key to /etc/apt/trusted.gpg.d/ondrej-ubuntu-apache2.gpg with fingerprint 14AA40EC0831756756D7F66C4F4EA0AAE5267A6C
Hit:1 http://fr.archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://fr.archive.ubuntu.com/ubuntu jammy-updates InRelease
Hit:3 http://fr.archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:4 http://fr.archive.ubuntu.com/ubuntu jammy-security InRelease
Get:5 https://ppa.launchpadcontent.net/ondrej/apache2/ubuntu jammy InRelease [24.6 kB]
Hit:6 https://apt.postgresql.org/pub/repos/apt jammy-pgdg InRelease
Hit:7 http://repo.zabbix.com/zabbix/6.0/ubuntu jammy InRelease
Hit:8 https://packages.redis.io/deb jammy InRelease
Get:9 https://ppa.launchpadcontent.net/ondrej/apache2/ubuntu jammy/main amd64 Packages [4,304 B]
Get:10 https://ppa.launchpadcontent.net/ondrej/apache2/ubuntu jammy/main Translation-en [3,236 B]
Fetched 32.1 kB in 1s (42.4 kB/s)
Reading package lists... Done
W: http://repo.zabbix.com/zabbix/6.0/ubuntu/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
Reading package lists...
Building dependency tree...
Reading state information...
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:
libpcre2-dev : Depends: libpcre2-8-0 (= 10.39-3ubuntu0.1) but 10.42-3+ubuntu22.04.1+deb.sury.org+1 is to be installed
libxml2-dev : Depends: libxml2 (= 2.9.13+dfsg-1ubuntu0.4) but 2.9.14+dfsg-0.1+ubuntu22.04.1+deb.sury.org+1 is to be installed
E: Unable to correct problems, you have held broken packages.
The error message suggests that there are some dependency conflicts caused by the inclusion of a third-party repository (PPA) from Ondřej Surý that provides newer versions of certain packages than those available in the official Ubuntu repositories.
In this example, it was possible to fix the issue with the following steps:
Remove the PPA which causes the conflict:
Run the following command:
sudo add-apt-repository -r ppa:ondrej/apache2
Update the package lists:
Run the following command:
sudo apt update
Install the required dependencies:
Run the following command:
sudo apt install libpcre2-8-0=10.39-3ubuntu0.1 libxml2=2.9.13+dfsg-1ubuntu0.4
Try to fix any broken dependencies:
sudo apt --fix-broken install
After this step, try the EMS 7.4.0 installation again:
sudo ./forticlientems_7.4.0.1793.bin -- --allowed_hosts '*' --enable-remote-https