How to set $LD_LIBRARY_PATH in Ubuntu?

本文将指导您在Ubuntu系统中配置LD_LIBRARY_PATH环境变量的方法,以便正确加载动态链接库。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

http://serverfault.com/questions/201709/how-to-set-ld-library-path-in-ubuntu
交叉编译不能执行怎么办xy-shiqi@xyshiqi-vmware:~/ros2_ws/src/only-navigaton$ cd ~/ros2_ws rm -rf build_arm install_arm log xy-shiqi@xyshiqi-vmware:~/ros2_ws$ unset LD_LIBRARY_PATH xy-shiqi@xyshiqi-vmware:~/ros2_ws$ source /opt/poky/3.1.20/environment-setup-aarch64-poky-linux source /opt/ros/humble/setup.bash xy-shiqi@xyshiqi-vmware:~/ros2_ws$ source /opt/poky/3.1.20/environment-setup-aarch64-poky-linux Your environment is misconfigured, you probably need to 'unset LD_LIBRARY_PATH' but please check why this was set in the first place and that it's safe to unset. The SDK will not operate correctly in most cases when LD_LIBRARY_PATH is set. For more references see: http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN80 http://xahlee.info/UnixResource_dir/_/ldpath.html xy-shiqi@xyshiqi-vmware:~/ros2_ws$ source /opt/poky/3.1.20/environment-setup-aarch64-poky-linux Your environment is misconfigured, you probably need to 'unset LD_LIBRARY_PATH' but please check why this was set in the first place and that it's safe to unset. The SDK will not operate correctly in most cases when LD_LIBRARY_PATH is set. For more references see: http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN80 http://xahlee.info/UnixResource_dir/_/ldpath.html xy-shiqi@xyshiqi-vmware:~/ros2_ws$ source /opt/ros/humble/setup.bash xy-shiqi@xyshiqi-vmware:~/ros2_ws$ colcon build \ --build-base build_arm \ --install-base install_arm \ --merge-install \ --cmake-args \ -DCMAKE_TOOLCHAIN_FILE=/opt/poky/3.1.20/sysroots/x86_64-pokysdk-linux/usr/share/cmake/OEToolchainConfig.cmake Starting >>> only-navigaton --- stderr: only-navigaton CMake Error at /opt/ros/humble/share/ament_cmake/cmake/ament_cmake_export_dependencies-extras.cmake:21 (find_package): By not providing "Findament_cmake_export_interfaces.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "ament_cmake_export_interfaces", but CMake did not find one. Could not find a package configuration file provided by "ament_cmake_export_interfaces" with any of the following names: ament_cmake_export_interfacesConfig.cmake ament_cmake_export_interfaces-config.cmake Add the installation prefix of "ament_cmake_export_interfaces" to CMAKE_PREFIX_PATH or set "ament_cmake_export_interfaces_DIR" to a directory containing one of the above files. If "ament_cmake_export_interfaces" provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): /opt/ros/humble/share/ament_cmake/cmake/ament_cmakeConfig.cmake:41 (include) CMakeLists.txt:31 (find_package) --- Failed <<< only-navigaton [0.54s, exited with code 1] Summary: 0 packages finished [0.76s] 1 package failed: only-navigaton 1 package had stderr output: only-navigaton xy-shiqi@xyshiqi-vmware:~/ros2_ws$
最新发布
07-16
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值