How To Install mecab on CentOS 8
Introduction
In this tutorial we learn how to install mecab on CentOS 8.
What is mecab
MeCab is a open source morphological analyzer which uses CRF (Conditional Random Fields) as the estimation of parameters. NOTE You have to install MeCab dictionary rpm to make use of MeCab.
We can use yum or dnf to install mecab on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install mecab.
Install mecab on CentOS 8 Using dnf
Update yum database with dnf using the following command.
sudo dnf makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install mecab using dnf by running the following command:
sudo dnf -y install mecab
Install mecab on CentOS 8 Using yum
Update yum database with yum using the following command.
sudo yum makecache --refresh
The output should look something like this:
CentOS Linux 8 - AppStream 43 kB/s | 4.3 kB 00:00
CentOS Linux 8 - BaseOS 65 kB/s | 3.9 kB 00:00
CentOS Linux 8 - ContinuousRelease 43 kB/s | 3.0 kB 00:00
CentOS Linux 8 - Extras 23 kB/s | 1.5 kB 00:00
CentOS Linux 8 - FastTrack 40 kB/s | 3.0 kB 00:00
CentOS Linux 8 - HighAvailability 36 kB/s | 3.9 kB 00:00
CentOS Linux 8 - Plus 24 kB/s | 1.5 kB 00:00
CentOS Linux 8 - PowerTools 50 kB/s | 4.3 kB 00:00
Extra Packages for Enterprise Linux Modular 8 - x86_64 13 kB/s | 9.2 kB 00:00
Extra Packages for Enterprise Linux 8 - x86_64 24 kB/s | 8.5 kB 00:00
Metadata cache created.
After updating yum database, We can install mecab using yum by running the following command:
sudo yum -y install mecab
How To Uninstall mecab on CentOS 8
To uninstall only the mecab package we can use the following command:
sudo dnf remove mecab
mecab Package Contents on CentOS 8
/etc/mecabrc
/usr/bin/mecab
/usr/lib/.build-id
/usr/lib/.build-id/05
/usr/lib/.build-id/05/8fb29b5aa149b6e5ad4cf9ee646fb3a4d87406
/usr/lib/.build-id/0e
/usr/lib/.build-id/0e/f8298ecb8b6e6efa2a312286d53475c2c97da8
/usr/lib/.build-id/23
/usr/lib/.build-id/23/635e30da907665fd81ab6b0c3342832aba62a4
/usr/lib/.build-id/42
/usr/lib/.build-id/42/7d03e3b0021cb9ae4d46f65659769416c27fdf
/usr/lib/.build-id/4b
/usr/lib/.build-id/4b/20ac7168774649970d084d96e92d458e609fcf
/usr/lib/.build-id/95
/usr/lib/.build-id/95/5d51b848f8b8b64d346d24b09edbaa1c38291e
/usr/lib/.build-id/af
/usr/lib/.build-id/af/db2e707f9fade21cba346006245870f0330cb1
/usr/lib64/libmecab.so.2
/usr/lib64/libmecab.so.2.0.0
/usr/lib64/mecab
/usr/lib64/mecab/dic
/usr/libexec/mecab
/usr/libexec/mecab/mecab-cost-train
/usr/libexec/mecab/mecab-dict-gen
/usr/libexec/mecab/mecab-dict-index
/usr/libexec/mecab/mecab-system-eval
/usr/libexec/mecab/mecab-test-gen
/usr/share/doc/mecab
/usr/share/doc/mecab/AUTHORS
/usr/share/doc/mecab/BSD
/usr/share/doc/mecab/COPYING
/usr/share/doc/mecab/GPL
/usr/share/doc/mecab/LGPL
/usr/share/doc/mecab/doc
/usr/share/doc/mecab/doc/bindings.html
/usr/share/doc/mecab/doc/dic-detail.html
/usr/share/doc/mecab/doc/dic.html
/usr/share/doc/mecab/doc/en
/usr/share/doc/mecab/doc/en/bindings.html
/usr/share/doc/mecab/doc/feature.html
/usr/share/doc/mecab/doc/feature.png
/usr/share/doc/mecab/doc/flow.png
/usr/share/doc/mecab/doc/format.html
/usr/share/doc/mecab/doc/index.html
/usr/share/doc/mecab/doc/learn.html
/usr/share/doc/mecab/doc/libmecab.html
/usr/share/doc/mecab/doc/mecab.css
/usr/share/doc/mecab/doc/mecab.html
/usr/share/doc/mecab/doc/partial.html
/usr/share/doc/mecab/doc/posid.html
/usr/share/doc/mecab/doc/result.png
/usr/share/doc/mecab/doc/soft.html
/usr/share/doc/mecab/doc/unk.html
/usr/share/doc/mecab/example
/usr/share/doc/mecab/example/example.c
/usr/share/doc/mecab/example/example.cpp
/usr/share/doc/mecab/example/example_lattice.c
/usr/share/doc/mecab/example/example_lattice.cpp
/usr/share/doc/mecab/example/thread_test.cpp
/usr/share/man/man1/mecab.1.gz
References
Summary
In this tutorial we learn how to install mecab on CentOS 8 using yum and dnf.