linux – Fedora 39/40 package install mirror failed to connect to 127.0.0.1

I just upgraded from Fedora 39 to Fedora 40 but the problem persist.

When I try to install some package, I get an error saying that it couldn’t connect to mirrors server.

I think somehow I’ve broken the certificates that trusts websites or something.

Do you have any ideea how can I solve this?

Sample command output:

[user@g6 test]$ virtualbox
bash: virtualbox: command not found...
Install package 'VirtualBox' to provide command 'virtualbox'? [N/y] y


 * Waiting in queue... 
 * Loading list of packages.... 
 * Downloading details about the software repositories.... 
 * Loading list of packages.... 
The following packages have to be installed:
 VirtualBox-7.0.16-1.fc40.x86_64        A general-purpose full virtualizer for PC hardware
 VirtualBox-kmodsrc-7.0.16-1.fc40.noarch        VirtualBox kernel module source code
 VirtualBox-server-7.0.16-1.fc40.x86_64 core part (host server) for VirtualBox
 akmod-VirtualBox-7.0.16-1.fc40.x86_64  Akmod package for VirtualBox kernel module(s)
 liblzf-3.6-28.fc40.x86_64      Small data compression library
Proceed with changes? [N/y] y


 * Waiting in queue... 
 * Waiting for authentication... 
 * Waiting in queue... Failed to install packages: Curl error (7): Couldn't connect to server for https://mirrors.fedoraproject.org/metalink?repo=fedora-40&arch=x86_64 [Failed to connect to 127.0.0.1 port 27015 after 0 ms: Couldn't connect to server]

Read more here: Source link