LoginSignup
1
2

More than 3 years have passed since last update.

ubuntu18.04にCabochaを導入する際のエラー

Last updated at Posted at 2019-05-27

もう既出がたくさんありますが、Chabochaを導入する際に詰まったところを記しておきます.

導入の手順は公式サイトに書いてあります。
https://taku910.github.io/cabocha/
CRF++等の導入は以下を参考にさせていただきました。
https://qiita.com/osyou-create/items/4e2f686d82bf9e1166e8

環境

  • Ubuntu 18.04
  • python3.6
  • CRF++-0.58

CaboChaディレクトリ内でのmake

error while loading shared libraries:libcrfpp.so.0 : cannot open shared object file: No such file or directory

解決策
libc.confに依存関係を記入してあげる。

chmod 666 /etc/ld.so.conf.d/libc.conf
echo "/usr/local/lib">>/etc/ld.so.conf.d/libc.conf

以上より、無事makeが実行されました。

Pythonでの呼び出し


import CaboCha
>>ModuleNotFoundError  No module named '_CaboCha'

sudoを使わずにビルドしちゃった

sudo python3 setup.py build_ext
sudo python3 setup.py install
sudo /sbin/ldconfig

これでオッケー

1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2