Using osg and osgearth for omnet++ ubuntu 20.04

438 Views Asked by At

I am trying to use OpenSceneGraph and OSGEarth modules for omnet++.

However, when I installed this packages as told in Installation guide of omnet++ using the commands

sudo apt-get install openscenegraph-plugin-osgearth libosgearth-dev    
sudo apt-get install libopenscenegraph-dev

and after changing the configure.user file in omnet++ root directory, and run ./configure, I get this error:

checking for osgEarth with CFLAGS=" -fPIC  -fno-omit-frame-pointer  " LIBS=" -Wl,--export-dynamic   -losgEarth -losgEarthUtil -lgeos_c "... no
configure: error: Cannot find osgEarth 2.7 or later. Set WITH_OSGEARTH=no in configure.user to disable this feature or install an up to date version of osgEarth.

I tried to removing and reinstalling all the packages and reinstalling omnet itself. But still get the same error

1

There are 1 best solutions below

0
On BEST ANSWER

I solved the problem by installing

sudo-apt get install aptitude

the libosgearth-dev package has unmet dependencies and it needs to be solved. aptitude suggests two solutions and I chose the second, which is downgrading previously installed packages. The output is like this:

~$ sudo aptitude install libosgearth-dev
The following NEW packages will be installed:
  libosgearth-dev{b} 
The following packages will be REMOVED:
  libosgearthsplat5{u} 
0 packages upgraded, 1 newly installed, 1 to remove and 0 not upgraded.
Need to get 0 B/546 kB of archives. After unpacking 2.518 kB will be used.
The following packages have unmet dependencies:
 libosgearth-dev : Depends: libosgearth5 (= 2.10.2+dfsg-2build2) but 2.10.2+dfsg-2build5 is installed
                   Depends: libosgearthannotation5 (= 2.10.2+dfsg-2build2) but 2.10.2+dfsg-2build5 is installed
                   Depends: libosgearthfeatures5 (= 2.10.2+dfsg-2build2) but 2.10.2+dfsg-2build5 is installed
                   Depends: libosgearthsplat5 (= 2.10.2+dfsg-2build2) but it is not going to be installed
                   Depends: libosgearthsymbology5 (= 2.10.2+dfsg-2build2) but 2.10.2+dfsg-2build5 is installed
                   Depends: libosgearthutil5 (= 2.10.2+dfsg-2build2) but 2.10.2+dfsg-2build5 is installed
The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1)     libosgearth-dev [Not Installed]                    



Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:

     Install the following packages:                                            
1)     libcoin80c [4.0.0+ds-1build1 (focal)]                                    
2)     libopenscenegraph160 [3.6.4+dfsg1-3build2 (focal)]                       

     Downgrade the following packages:                                          
3)     libosgearth5 [2.10.2+dfsg-2build5 (now) -> 2.10.2+dfsg-2build2 (focal)]  
4)     libosgearthannotation5 [2.10.2+dfsg-2build5 (now) -> 2.10.2+dfsg-2build2 
5)     libosgearthfeatures5 [2.10.2+dfsg-2build5 (now) -> 2.10.2+dfsg-2build2 (f
6)     libosgearthsplat5 [2.10.2+dfsg-2build5 (now) -> 2.10.2+dfsg-2build2 (foca
7)     libosgearthsymbology5 [2.10.2+dfsg-2build5 (now) -> 2.10.2+dfsg-2build2 (
8)     libosgearthutil5 [2.10.2+dfsg-2build5 (now) -> 2.10.2+dfsg-2build2 (focal



Accept this solution? [Y/n/q/?] Y
The following packages will be DOWNGRADED:
  libosgearth5 libosgearthannotation5 libosgearthfeatures5 
  libosgearthsplat5 libosgearthsymbology5 libosgearthutil5 
The following NEW packages will be installed:
  libcoin80c{a} libopenscenegraph160{a} libosgearth-dev 
0 packages upgraded, 3 newly installed, 6 downgraded, 0 to remove and 0 not upgraded.
Need to get 12,5 MB/13,0 MB of archives. After unpacking 49,0 MB will be used.
Do you want to continue? [Y/n/?] Y