Snap install cmake --classic error

I’m deploying a free5gc project and I have created an Ubuntu Server VM in virtual Box for the installation of the UERANSIM I need to run these commands sudo apt install make sudo apt install g++ sudo apt install libsctp-dev lksctp-tools sudo apt install iproute2 sudo snap install cmake --classic but the last command gives me this error

ubuntu@ueransim:~$ sudo snap install cmake --classic error: cannot install “cmake”: Post Method Not Allowed

So I tried to see if the server status is up and gave me this output

ubuntu@ueransim:~$ sudo systemctl status snapd ● snapd.service - Snap Daemon Loaded: loaded (/lib/systemd/system/snapd.service; enabled; vendor preset: enabled) Drop-In: /etc/systemd/system/snapd.service.d └─snap_proxy.conf Active: inactive (dead) since Sun 2023-08-20 12:36:49 UTC; 27s ago TriggeredBy: ● snapd.socket Process: 1527 ExecStart=/usr/lib/snapd/snapd (code=exited, status=42) Main PID: 1527 (code=exited, status=42) Am I doing something wrong or the snap services are out? Any help would be really appreciated thank you!

I am having the same issue. In my case, the snapd.service is running fine. But all snap commands end up with “Method Not Allowed” or “Moved Permanently” error. Did you be able to fix this?