安装ndn-traffic-generator遇Waf脚本与库版本不匹配问题求助
Hey there, that Waf version mismatch is a super common gotcha when setting up NDN tools like ndn-traffic-generator—these projects rely on specific Waf versions to play nice with ndn-cxx. Let’s fix this step by step:
Uninstall your system’s default Waf
The Waf installed via your package manager is almost certainly the wrong version here. For Debian/Ubuntu systems, run:sudo apt remove --purge wafAdjust the command for your distro (e.g.,
sudo dnf remove waffor Fedora,brew uninstall waffor macOS).Install the exact Waf version the script expects (2.0.6)
You’ll need to grab Waf 2.0.6 directly and install it globally:# Download the 2.0.6 release wget https://waf.io/waf-2.0.6.tar.bz2 tar xjf waf-2.0.6.tar.bz2 cd waf-2.0.6 # Install it system-wide sudo ./waf-light installVerify it worked with
waf --version—it should output2.0.6.Clean up and reconfigure ndn-traffic-generator
Head back to your ndn-traffic-generator directory, delete any old build files, and re-run the configure step:rm -rf build ./waf configureThis should now use the correct Waf version that matches the script included with the tool.
Fallback: Use ndn-cxx’s bundled Waf
If the above doesn’t work, ndn-cxx usually includes a compatible Waf version in its source tree. Find where you built or installed ndn-cxx, then run the ndn-traffic-generator configure command using that Waf binary directly:/path/to/your/ndn-cxx/source/waf configureJust replace
/path/to/your/ndn-cxx/sourcewith the actual path to your ndn-cxx source directory.Double-check ndn-cxx compatibility
Make sure your ndn-cxx version is supported by the ndn-traffic-generator you’re using. Check the project’s README or INSTALL.rst for version requirements—mismatched ndn-cxx versions can also trigger weird Waf-related errors.
内容的提问来源于stack exchange,提问作者Coding bat

