Gazebo | Ignition | Community
Ask Your Question
0

Ubuntu 22.04 and Gazebo Classic not working

asked 2022-11-12 20:58:07 -0600

ljaniec gravatar image

Hello,

I upgraded Ubuntu 20.04 to the 22.04 version. I installed ROS2 Humble (sudo apt install ros-humble-desktop-full) and I wanted to use Gazebo Classic with Nav2 simulations, but I cannot use it - my packages have unmet dependencies, that I couldn't fix. Please hint me what I should do now.

My terminal logs:

  • When I tried normal sudo apt install gazebo:
ljaniec@ljaniec-PC:~$ gazebo

Command 'gazebo' not found, but can be installed with:

sudo apt install gazebo

ljaniec@ljaniec-PC:~$ sudo apt install gazebo

Reading package lists... Done

Building dependency tree... Done

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:

 gazebo : Depends: libgazebo11 (= 11.10.2+dfsg-1) but 11.12.0-1~focal is to be installed

E: Unable to correct problems, you have held broken packages.
  • When I tried sudo apt install ros-humble-gazebo-ros-pkgs:
ljaniec@ljaniec-PC:~$ sudo apt install ros-humble-gazebo-ros-pkgs 

Reading package lists... Done

Building dependency tree... Done

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:

 gazebo : Depends: libgazebo11 (= 11.10.2+dfsg-1) but 11.12.0-1~focal is to be installed

 gz-tools2 : Conflicts: gazebo (>= 11.0.0) but 11.10.2+dfsg-1 is to be installed

 libgazebo-dev : Depends: libgazebo11 (= 11.10.2+dfsg-1) but 11.12.0-1~focal is to be installed

E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

ljaniec@ljaniec-PC:~$ sudo apt install libgazebo11

Reading package lists... Done

Building dependency tree... Done

Reading state information... Done

libgazebo11 is already the newest version (11.12.0-1~focal).

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Best Łukasz

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2022-11-15 15:14:51 -0600

ljaniec gravatar image

This problem was resolved, description: https://github.com/gazebosim/gazebo-c...

# Check what is going to be removed 

dpkg -l | grep '^ii.*\(libignition\|sdformat\|gazebo\).*~focal'

# Remove everything 
while [[ -n $(dpkg -l | grep '^ii.*\(libignition\|sdformat\|gazebo\).*~focal' | awk '{ print $2 };') ]]; do sudo dpkg -r $(dpkg -l | grep '^ii.*\(libignition\|sdformat\|gazebo\).*~focal' | awk '{ print $2 }';); done

# Install new Gazebo on Jammy (or just install the humble desktop full) 

sudo apt install libgazebo-dev
edit flag offensive delete link more

Comments

Thanks @jlaniec but I'm not using focal repos but jammy. I haven't updated Ubuntu. It's a clean installation on Ubuntu 22.04.

lfernandez gravatar imagelfernandez ( 2022-11-17 10:50:54 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2022-11-12 20:58:07 -0600

Seen: 67 times

Last updated: Nov 15