libboost 的两个版本

libboost 的两个版本

我正在使用需要安装 libboost 的 ndnSIM 模拟器,当我尝试运行任何代码时,出现以下错误:


usr/local/lib/libns3-dev-emu-optimized.so: undefined reference to ns3::Queue::Dequeue()'
/usr/local/lib/libns3-dev-emu-optimized.so: undefined reference to ns3::CallbackBase::Demangle(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/local/lib/libns3-dev-emu-optimized.so: undefined reference to ns3::Queue::GetTypeId()'
/usr/local/lib/libns3-dev-emu-optimized.so: undefined reference to ns3::LogComponent::LogComponent(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, ns3::LogLevel)'
/usr/local/lib/libns3-dev-emu-optimized.so: undefined reference to ns3::Queue::Enqueue(ns3::Ptr<ns3::Packet>)'
/usr/local/lib/libns3-dev-emu-optimized.so: undefined reference to ns3::TypeId::AddAttribute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, ns3::AttributeValue const&, ns3::Ptr<ns3::AttributeAccessor const>, ns3::Ptr<ns3::AttributeChecker const>)'
/usr/local/lib/libns3-dev-emu-optimized.so: undefined reference to ns3::PcapHelper::CreateFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::_Ios_Openmode, unsigned int, unsigned int, int)'
/usr/local/lib/libns3-dev-emu-optimized.so: undefined reference to typeinfo for ns3::Queue'
collect2: error: ld returned 1 exit status

我读到这可能是由于有两个 boost 库造成的。因此我运行了locate命令并得到了以下输出


locate libboost_system

/usr/lib/i386-linux-gnu/libboost_system.a
/usr/lib/i386-linux-gnu/libboost_system.so
/usr/lib/i386-linux-gnu/libboost_system.so.1.58.0
/usr/local/lib/libboost_system.a
/usr/local/lib/libboost_system.so
/usr/local/lib/libboost_system.so.1.62.0

这就是我收到错误的原因吗?如何在不影响我的模拟器的情况下升级或删除最旧版本?

相关内容