ログインしてさらにmixiを楽しもう

コメントを投稿して情報交換!
更新通知を受け取って、最新情報をゲット!

Linuxコミュの【質問】 Ocsigen のインストール方法

  • mixiチェック
  • このエントリーをはてなブックマークに追加
初めまして

何時間かOcamlとOcsigenのインストールを試してみましたが、上手く行きませんでしたので投稿しました。
ご教示お願い致します。


■ 環境
---------------------------------
Virtual Machine Soft: VMWare Player
HostOS: Windows 7 Ultimate 64bit
GestOS: CentOS 5.5 (CentOS-5.5-i386-bin-DVD.iso からインストール)
CPU: Core i5 750
Mem: DDR3 2G * 4
VGA: GeForce GT 220
---------------------------------


■ したいこと
Ocsigenサーバで Ocaml Web プログラミングの挑戦
(ゆくゆくはOcsigenでサーバ運用)



■ インストール前に行ったこと

以下のファイルを編集した内容を書きます。
/etc/yum.repos.d/CentOS-Base.repo

------------------------------------------------------------
[base]
name=CentOS-$releasever - Base
baseurl=http://ftp.riken.jp/Linux/caos/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://ftp.riken.jp/Linux/caos/centos/RPM-GPG-KEY-CentOS-5

#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=http://ftp.riken.jp/Linux/caos/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://ftp.riken.jp/Linux/caos/centos/RPM-GPG-KEY-CentOS-5

#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
baseurl=http://ftp.riken.jp/Linux/caos/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://ftp.riken.jp/Linux/caos/centos/RPM-GPG-KEY-CentOS-5

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=http://ftp.riken.jp/Linux/caos/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://ftp.riken.jp/Linux/caos/centos/RPM-GPG-KEY-CentOS-5

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=http://ftp.riken.jp/Linux/caos/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=1
gpgkey=http://ftp.riken.jp/Linux/caos/centos/RPM-GPG-KEY-CentOS-5

#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
baseurl=http://ftp.riken.jp/Linux/caos/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=1
gpgkey=http://ftp.riken.jp/Linux/caos/centos/RPM-GPG-KEY-CentOS-5

------------------------------------------------------------


上記設定後に以下のコマンドを実行してから、OcamlとOcsigenのインストールに試みています。
[root@xxxx tmp]# yum clean all
[root@xxxx tmp]# yum update



■ 試したコマンドと結果

Linuxをインストールして、設定するのは初めてですので、何が悪いのか一切分かりませんので、実行したコマンドとその結果を直接書き込みたいと思います。
(※インストールだけなら何度かありますが、それ以上の事はやったことがありません。)


--------------------------------------------------------------
[root@xxxx tmp]# sudo yum install ocaml
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
addons                            |  951 B        00:00
base                              | 2.1 kB        00:00
centosplus                        | 1.9 kB        00:00
contrib                           |  951 B        00:00
extras                            | 2.1 kB        00:00
updates                           | 1.9 kB        00:00
Setting up Install Process
No package ocaml available.
Nothing to do

--------------------------------------------------------------
[root@xxxx tmp]# tar -zxf ocaml-3.11.2.tar.gz
[root@xxxx tmp]# cd ocaml-3.11.2
[root@xxxx tmp]# ./configure
Configuring for a i686-pc-linux-gnu ...
Unable to compile the test program.
Make sure the C compiler cc -0 is properly installed.
[root@xxxx tmp]# make world
Makefile:17: config/Makefile: No such file or directory
make: *** No rule to make target `config/Makefile'. Stop.


--------------------------------------------------------------
[root@xxxx tmp]# rpm -ivh ocaml-3.10.1-1.el5.i386.rpm
warning: ocaml-3.10.1-1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 05c387ef
error: Failed dependencies:
        libtk8.4.so is needed by ocaml-3.10.1-1.el5.i386
[root@xxxx tmp]# yum install tk
~~~~~ (省略
Complete!
[root@xxxx tmp]# rpm -ivh ocaml-3.10.1-1.el5.i386.rpm
warning: ocaml-3.10.1-1.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 05c387ef
~~~~ (省略
xxxxx [100%]
(↑完了っぽいメッセージが出ましたが、何かのコマンドを押してしまい、画面から文字が消えてしまったので全部書けませんでした。)

--------------------------------------------------------------
[root@xxxx tmp]# tar -zxf ocsigen-1.3.2.tar.gz
[root@xxxx tmp]# cd ocsigen-1.3.2
[root@xxxx ocsigen-1.3.2]# ./configure
Welcom to Ocsigen version 1.3.2
Checking for findlib... not found
Make sure that ocamlfind is in your PATH, or install findlib
(from www.ocaml-programming.de)
[root@xxxx ocsigen-1.3.2]# make
Makefile:1: Makefile.config: No such file or directory
make: *** No rule to make target `Makefile.config'. Stop.
[root@xxxx tmp]# cd ..
[root@xxxx tmp]# tar -zxf findlib-1.2.1.tar.gz
[root@xxxx findlib-1.2.1]# cd ./findlib-1.2.1
[root@xxxx findlib-1.2.1]# ./configure
Welcom to findlib version 1.2.1
Configuring core...
Testing threding model...
systhread_supported: true
Testing DLLs...
Configuring libraries...
labltk: found
camlp4: using camlp4, style 310
Configuration for dbm written to site-lib-src/dbm/META
Configuration for dynlink written to site-lib-src/dynlink/META
Configuration for graphics written to site-lib-src/graphics/META
Configuration for num written to site-lib-src/num/META
Configuration for num-top written to site-lib-src/num-top/META
Configuration for str written to site-lib-src/str/META
Configuration for threads written to site-lib-src/threads/META
Configuration for unix written to site-lib-src/unix/META
Configuration for stdlib written to site-lib-src/stdlib/META
Configuration for bigarray written to site-lib-src/bigarray/META
Configuration for labltk written to site-lib-src/labltk/META
Configuration for camlp4 written to site-lib-src/camlp4/META
Detecting compiler arguments: FAILED
[root@xxxx findlib-1.2.1]# sudu make install
Makefile:6: Makefile.config: No such file or directory
make: *** No rule to make target `Makefile.config'. Stop.


以上
宜しくお願いします。

コメント(7)

> rub さん
はじめまして

Ocsigen-1.3.2 は ocaml-3.11 以上を推奨しています.(./ocsigen-1.3.2/README より)
無用なトラブルを避けるために,まず ocaml-3.11.2 を野良ビルドしたほうがいいと思います.

また,ocaml を野良ビルドする際は
$ ./configure
$ make world opt
$ sudo make install
findlib を野良ビルドする際は
$ ./configure
$ make all opt
$ sudo make install
だったような気がします...
> harre_orzさん

rpmはアンインストールして、やり直してみたところ以下の様な結果が返ってきます。
教えて頂いたコマンドも同様に、Google先生で出てきたサイトのコマンドも駄目でした。
"make xxxxx" のコマンドを打ち込むと、同じメッセージしか返りません。。



[root@xxxxx ocaml-3.11.2]# ./configure
Configuring for a i686-pc-linux-gnu ...
Unable to compile the test program.
Make sure the C compiler cc -0 is preperly installed.
[root@xxxxx ocaml-3.11.2]# make world
Makefile:17: config/Makefile: No such file or directory
make: *** No rule to make target `config/Makefile'. Stop.
[root@xxxxx ocaml-3.11.2]# make bootstrap
Makefile:17: config/Makefile: No such file or directory
make: *** No rule to make target `config/Makefile'. Stop.
[root@xxxxx ocaml-3.11.2]# make opt
Makefile:17: config/Makefile: No such file or directory
make: *** No rule to make target `config/Makefile'. Stop.
[root@xxxxx ocaml-3.11.2]# make opt.opt
Makefile:17: config/Makefile: No such file or directory
make: *** No rule to make target `config/Makefile'. Stop.
[root@xxxxx ocaml-3.11.2]# make install
Makefile:17: config/Makefile: No such file or directory
make: *** No rule to make target `config/Makefile'. Stop.
以下のコマンドで Ocaml はインストール出来ました!

[root@xxxxx tmp]# rpm -qa | grep gcc
libgcc-4.1.2-48.el5
[root@xxxxx tmp]# yum install gcc
[root@xxxxx tmp]# tar zxvf ocaml-3.11.2.tar.gz
[root@xxxxx tmp]# cd ./ocaml-3.11.2
[root@xxxxx tmp]# ./configure
[root@xxxxx tmp]# make world
[root@xxxxx tmp]# make bootstrap
[root@xxxxx tmp]# make opt
[root@xxxxx tmp]# make world.opt
[root@xxxxx tmp]# ./build/fastworld.sh
[root@xxxxx tmp]# umask 022
[root@xxxxx tmp]# make install
[root@xxxxx tmp]# ./build/install.sh

引き続き Ocsigen のインストールを試してみます。
連続書き込み済みません。
参考にしたサイトを書き置きしておきます。

Installing Objective Caml on a Unix machine
http://caml.inria.fr/pub/distrib/ocaml-3.11/notes/INSTALL

OCaml プログラミング入門 (インストール).mht
http://www.i.kyushu-u.ac.jp/~bannai/ocaml-intro/install.html
> rub さん

Ocsigen のコンパイラするときにも使える OMake という強力なビルドツールがあるので,もしよかったら調べてみて下さい.
> harre_orz さん

ありがとうございます。
時間が空いたときにまた試してみたいと思います!

ログインすると、みんなのコメントがもっと見れるよ

mixiユーザー
ログインしてコメントしよう!

Linux 更新情報

Linuxのメンバーはこんなコミュニティにも参加しています

星印の数は、共通して参加しているメンバーが多いほど増えます。