I could not download Gazebo for Ubuntu 24.04

[Sorry for my bad English. English is not my native language.]

A few days ago I downloaded Ubuntu 24.04. I installed it on my computer with VMware.

After that, I successfully installed and ran the ardupilot by following the steps below.

1) sudo apt-get update
2) sudo apt-get upgrade

3) sudo apt-get install git
4) sudo apt-get install gitk git-gui

5) sudo apt-get install python3-pip python3-matplotlib python3-wxgtk4.0 python3-lxml python3-scipy python3-opencv ccache gawk git python3-pexpect
	5.1) clear

6) git clone https://github.com/ArduPilot/ardupilot.git
	6.1) cd ardupilot

7) git submodule update --init --recursive

8) Tools/environment_install/install-prereqs-ubuntu.sh -y (This step took a long time. A library named wxpython took a long time to load.)

9) . ~/.profile 

10) ./waf configure --board sitl

11) ./waf copter

12) cd ~/ardupilot/ArduCopter

13) sim_vehicle.py -v ArduCopter --map --console

After that I started to build the gazebo step by step.

1) sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable lsb_release -cs main" > /etc/apt/sources.list.d/gazebo-stable.list'

2) wget https://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -

3) sudo apt-get install gazebo

After step 3, I got an error like this.

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package gazebo is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'gazebo' has no installation candidate

I couldn’t solve this error. None of the previous codes I wrote give an error. As for this one, it can’t find “gazebo”. I have been working on this problem for days. and I have tried many methods. Below I leave the methods that I have tried and did not work.

Gazebo 11 does not run

Gazebo 11 installation problems

None of the above worked. How do I fix this problem?

SOLUTION
Friends, since I couldn’t run Gazebo on “Ubuntu 24.04”, I used lower versions of Ubuntu and it worked without any problems.

I don’t think Gazebo 11 will be (ever) available for Ubuntu 24.04. You need to install a compatible version of Ubuntu, e.g. Ubuntu 20.04.

Thank you for your answer. I don’t want to use a very old version of Ubuntu, so I want to try 22.04 first.

Binary releases are only available up to 20.04 (focal): Index of /gazebo/ubuntu/pool/main/g/gazebo11/ .

22.04 won’t work. But you can try building it from source on that.

Any reason for still using Gazebo 11 (classic) which will reach end-of-life in about 4 months? From https://ardupilot.org/dev/docs/ros2-gazebo.html and https://ardupilot.org/dev/docs/sitl-with-gazebo.html#sitl-with-gazebo it looks like Ardupilot works with the new Gazebo (Gazebo Harmonic)

Thanks for your advice. Then I’m waiting for “Ubuntu 20.04” to download now. I’ll install Gazebo on it.

No, there is no particular reason. My only goal is to get Gazebo working.

Then I would highly recommend switching to Gazebo Harmonic. It works on Ubuntu 24.04

Thank you very much. As you said, it worked for Ubuntu version 20.04. It also worked for Ubuntu version 22.04.

Thanks for your advice. I was able to run Gazebo on “Ubuntu 22.04” version. So I don’t need to use “Ubuntu 24.04” anymore. But if I switch to “Ubuntu 24.04” again, I will definitely try your solution.