OsukiniサーバーにMeCabインストールしようとした時のエラー

SaaSesのVPSサービスOsukiniサーバーに形態素解析エンジンのMeCabをインストールしようとしたらconfigureの段階で以下のようなエラーが出て怒られた。

checking if g++ supports namespaces (required) … no
checking if g++ environment provides all required features… no
configure: error: Your compiler is not powerful enough to compile MeCab.         If it should be, see config.log for more information of why it failed.

g++というのはGNU C++コンパラのことなのでインストールする必要がある。OsukiniサーバーにはCentOS5をインストールして試用しているが最小構成のインストールになるようなのでデベロッパ系のソフトウェアはインストールされていないものあるようだ。

一応yumのsearchコマンドでgcc関係のソフトウェアを検索してみる。

[root@rad-xen-vweb7 mecab-0.98]# yum search gcc-
Loaded plugins: downloadonly, fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* extras: ftp.iij.ad.jp
* updates: ftp.iij.ad.jp
=============================================================================================================================== Matched: gcc- ================================================================================================================================
compat-gcc-34.i386 : Compatibility GNU Compiler Collection
compat-gcc-34-c++.i386 : 下位互換コンパイラのための C++ サポート
compat-gcc-34-g77.i386 : 下位互換コンパイラの為の Fortran 77 サポート
compat-libgcc-296.i386 : Compatibility 2.96-RH libgcc library
gcc-c++.i386 : GCC 用の C++ サポート
gcc-gfortran.i386 : Fortran 95 サポート
gcc-gnat.i386 : GCC用の Ada95サポート
gcc-java.i386 : GCC の Java サポート
gcc-objc++.i386 : GCC の Objective-C++ サポート
gcc-objc.i386 : GCC の Objective-C サポート
[root@rad-xen-vweb7 mecab-0.98]#

 

更にinfoコマンドでインストールされているかなどの詳細を調べてみる。

gcc-c++はAvailable Packagesにあるのでインストールはされていない。

[root@rad-xen-vweb7 mecab-0.98]# yum info gcc-*
Loaded plugins: downloadonly, fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.iij.ad.jp
* extras: ftp.iij.ad.jp
* updates: ftp.iij.ad.jp
Installed Packages
Name       : gcc
Arch       : i386
Version    : 4.1.2
Release    : 50.el5
Size       : 9.6 M
Repo       : installed
Summary    : Various compilers (C, C++, Objective-C, Java, …)
URL        : http://gcc.gnu.org
License    : GPL
Description: The gcc package contains the GNU Compiler Collection version 4.1.
           : You’ll need this package in order to compile C code.

Available Packages
Name       : gcc-c++
Arch       : i386
Version    : 4.1.2
Release    : 50.el5
Size       : 3.4 M
Repo       : base
Summary    : GCC 用の C++ サポート
URL        : http://gcc.gnu.org
License    : GPL
Description: このパッケージを使用すると GNU コンパイラに C++ のサポートが
           : 加わります。テンプレートや例外処理などを含む、最新の C++ 仕様の
           : ほとんどをサポートしています。

Name       : gcc-gfortran
Arch       : i386
Version    : 4.1.2
Release    : 50.el5
Size       : 3.1 M
Repo       : base
Summary    : Fortran 95 サポート
URL        : http://gcc.gnu.org
License    : GPL
Description: The gcc-gfortran package provides support for compiling Fortran 95
           : programs with the GNU Compiler Collection.

Name       : gcc-gnat
Arch       : i386
Version    : 4.1.2
Release    : 50.el5
Size       : 11 M
Repo       : base
Summary    : GCC用の Ada95サポート
URL        : http://gcc.gnu.org
License    : GPL
Description: GNATは、GCCへのGNU Ada 95フォントエンドです。このパッケージは開発ツール、文書、
           : Ada 95コンパイラを含んでいます。

Name       : gcc-java
Arch       : i386
Version    : 4.1.2
Release    : 50.el5
Size       : 2.9 M
Repo       : base
Summary    : GCC の Java サポート
URL        : http://gcc.gnu.org
License    : GPL
Description: This package adds support for compiling Java(tm) programs and
           : bytecode into native code.

Name       : gcc-objc
Arch       : i386
Version    : 4.1.2
Release    : 50.el5
Size       : 2.5 M
Repo       : base
Summary    : GCC の Objective-C サポート
URL        : http://gcc.gnu.org
License    : GPL
Description: gcc-objc provides Objective-C support for the GCC.
           : Mainly used on systems running NeXTSTEP, Objective-C is an
           : object-oriented derivative of the C language.

Name       : gcc-objc++
Arch       : i386
Version    : 4.1.2
Release    : 50.el5
Size       : 2.7 M
Repo       : base
Summary    : GCC の Objective-C++ サポート
URL        : http://gcc.gnu.org
License    : GPL
Description: gcc-objc++ package provides Objective-C++ support for the GCC.

[root@rad-xen-vweb7 mecab-0.98]#

yumからg++をインストール

# yum install gcc-c++

これでg++インストール後MeCabのconfigureは正常終了。インストールまで問題なし。

Osukiniサーバー(Linux) 料金・スペック|共用サーバー(VPS)ならSaaSes

MeCab: Yet Another Part-of-Speech and Morphological Analyzer

GNUコンパイラコレクション – Wikipedia

(Visited 94 times, 1 visits today)

タグ :