重新安装boost, 确保在/usr/local/lib/ 目录(或自定义的boost安装目录)下存在 libboost_iostreams.*等文件.
2) 如果提示类似下面的错误
/usr/include/boost/iostreams/filter/zlib.hpp:345: undefined reference to `boost::iostreams::detail::zlib_base::before(char const*&, char const*, char*&, char*)' /usr/include/boost/iostreams/filter/zlib.hpp:346: undefined reference to `boost::iostreams::zlib::no_flush' /usr/include/boost/iostreams/filter/zlib.hpp:346: undefined reference to `boost::iostreams::detail::zlib_base::xdeflate(int)' /usr/include/boost/iostreams/filter/zlib.hpp:347: undefined reference to `boost::iostreams::detail::zlib_base::after(char const*&, char*&, bool)'
查看安装boost时zlib设置是否正确, 如果安装boost (如运行./b2 install)时, 出现下面的提示,
- zlib : no (cached)
说明找不到zlib. 解决的办法是从http://www.zlib.net/下载zlib (如zlib-1.2.8.tar.gz), 并且解压.
在命令行下设置zlib路径
export ZLIB_SOURCE=/........./zlib-1.2.8
重新运行安装boost命令
再重新运行安装moses命令