この記事を参考にCabochaのインストールをしているのですが、sudo python setup.py build_ext
でエラーが出ました。
#エラー
shell
1Linux instance-1 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u6 (2018-10-08) x86_64 2 3The programs included with the Debian GNU/Linux system are free software; 4the exact distribution terms for each program are described in the 5individual files in /usr/share/doc/*/copyright. 6 7Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent 8permitted by applicable law. 9Last login: Sat Nov 3 00:16:16 2018 from 74.125.41.96 10username@instance-1:~$ ls 11cabocha-0.69 cabocha-0.69.tar.bz2 CRF++-0.58 CRF++-0.58.tar.gz main.py novels output.txt split.py 12username@instance-1:~$ cd cabocha-0.69 13username@instance-1:~/cabocha-0.69$ cd python 14username@instance-1:~/cabocha-0.69/python$ sudo python setup.py build_ext 15running build_ext 16building '_CaboCha' extension 17x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-2.7.13=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/local/include -I/usr/include/python2.7 -c CaboCha_wrap.cxx -o build/temp.linux-x86_64-2.7/CaboCha_wrap.o 18cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ 19CaboCha_wrap.cxx:154:21: fatal error: Python.h: No such file or directory 20 # include <Python.h> 21 ^ 22compilation terminated. 23error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
sudo消してやってみたり python を python3 にしてやってみたりもしましたがうまくいきません。
C++なのに‘-Wstrict-prototypes’って使ってるからダメだよ~ 的な感じだと思うのですが、どうすればよいでしょうか
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。