# cat /etc/redhat-release
CentOS Linux release 7.4.1708 (Core) 系統是這個
編譯boost遇到問題:
./boost/python/detail/wrap_python.hpp:50:23: fatal error: pyconfig.h: No such file or directory
# include <pyconfig.h>
原因:
沒有安裝對應python的python-dev依賴,不然編譯到boost python模塊的時候就會出錯。
python -v 查看是2.7版本的python
解決方案:
sudo yum install python-devel
注意是devel而不是dev,而ubuntu則是sudo apt-get install python-dev
查看:
ll /usr/include/python2.7/ | grep pyconfig.h 已經有了
-rw-r--r-- 1 root root 162 4月 9 22:31 pyconfig.h
經驗證是可以的。