You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu 16.04安装Omnet++报错:无法找到osgEarth

Troubleshooting osgEarth Detection Failure During ./configure

Hey there, let's work through this issue where your ./configure script can't find osgEarth 2.7 or later. Here are some actionable steps to fix this:

1. Verify Your osgEarth Version

First, make sure you actually have a compatible version installed:

  • Run the version check tool if available:
    osgEarthVersion
    
  • Or check the version header directly (adjust the path if you installed to a non-default location):
    grep OSGEARTH_VERSION /usr/include/osgEarth/Version.h
    

If the version is older than 2.7, you'll need to upgrade to a supported release of osgEarth.

2. Ensure osgEarth is in System Search Paths

If osgEarth is installed in a non-standard directory (like /usr/local or a custom path), the configure script might not locate it automatically. Try these fixes:

  • Set the pkg-config path (this helps configure find library metadata):
    export PKG_CONFIG_PATH=/path/to/osgEarth/lib/pkgconfig:$PKG_CONFIG_PATH
    ./configure
    
    Replace /path/to/osgEarth with your actual installation directory.
  • Explicitly specify include and library paths in the configure command:
    ./configure CFLAGS="-I/path/to/osgEarth/include" LIBS="-L/path/to/osgEarth/lib -losgEarth -losgEarthUtil"
    

3. Diagnose with config.log Details

Looking at your config.log, the test compilation for osgEarth failed. Check for these common issues in the log:

  • Missing header files: Look for lines like fatal error: osgEarth/Version.h: No such file or directory – this means the include path isn't set correctly.
  • Linker errors: Lines like undefined reference to osgEarth::... indicate the linker can't find the osgEarth libraries, so the library path is wrong.

4. Disable osgEarth (If You Don't Need It)

If you don't require osgEarth functionality for your build, follow the error message's suggestion:

  • Open the configure.user file and add or modify this line:
    WITH_OSGEARTH=no
    
  • Then re-run ./configure to skip the osgEarth check.

内容的提问来源于stack exchange,提问作者PARTH SURESH

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 07:27:32