nstall OPAM on Springdale/RHEL/CentOS/SL 5.X
来源:互联网 发布:国外虚拟手机号软件 编辑:程序博客网 时间:2024/06/03 19:05
Install OPAM on Springdale/RHEL/CentOS/SL 5.X
Posted by Theresa Arzadon-Labajo (tarzadon) on Feb 10 2014Tech Stuff >>Unix-LinuxShort version:
In order to install OPAM on a 5.X machine, it needed at least OCaml version 3.12, which needed a newer binutils, which needed a newer GCC, which needed a new mpfr-devel.
On a 6.X machine, all you need to do is to download and install OCaml version 3.12 and OPAM.
Long version (beware of the rabbit hole):
I first tried to download OPAM and run the installer, which gave me the error:
Initializing with compiler 4.01.0 /usr/local/bin/opam: /lib64/libc.so.6: version `GLIBC_2.7' not found (required by /usr/local/bin/opam) /usr/local/bin/opam: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /usr/local/bin/opam) configure: error: You must install the Camlp4 pre-processor. On some operating systems, these are separate packages from the main OCaml compiler, such as camlp4-extra on Debian.
Installed camlp4 and try installing opam again with the same error.
# yum install camlp4
I downloaded the OPAM tar ball and then tried compiling it again:
# ./configureOCaml version is 3.11.2OCaml library path is /usr/lib64/ocamlconfigure: error: You must install the Camlp4 pre-processor. On some operating systems, these are separate packages from the main OCaml compiler, such as camlp4-extra on Debian.
The default version on 5 and 6 machines is 3.11.2.
I then Downladed the 3.12 version from ocaml.org
cd /usr/local svn checkout http://caml.inria.fr/svn/ocaml/version/3.12 cd 3.12 ./configure .... BFD library not found, 'objinfo' will be unable to display info on .cmxs filesTo get rid of the BFD library error:
# yum install binutils-devel
Re-run the configure and finish compiling:
# make world# make bootstrap > log.bootstrap 2>&1# make opt > log.opt 2>&1# make opt.opt# umask 022# make install# make clean
Now, when I tried to run configure again, I got:
opam: /lib64/libc.so.6: version `GLIBC_2.7' not found (required by opam) opam: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by opam)
Install GLIBC
# git clone git://sourceware.org/git/glibc.git# cd glibc# git branch -a# git checkout --track -b local_glibc-2.14 origin/release/2.14/masterChecking out files: 100% (12834/12834), done.# mkdir glibc-build# cd glibc-build# ../glibc/configure --prefix=/usr/local/mylib/ ... running configure fragment for nptl/sysdeps/x86_64 checking for .cfi_personality and .cfi_lsda pseudo-ops... no configure: error: assembler too old, .cfi_personality support missing
According to Employed Russian on this link configure: error: assembler too old, .cfi_personality support missing, binutils needed to be updated.
Download newer Binutils
# wget http://ftp.gnu.org/gnu/binutils/binutils-2.20.1.tar.bz2# tar xjvf binutils-2.20.1.tar.bz2# cd binutils-2.20.1# ./configure# make && make install
Try configuring GLIBC again:
# ../glibc-2.14/configure --prefix=/usr/local/mylib/ --with-binutils=/usr/local ... checking cpuid.h usability... no checking cpuid.h presence... no checking for cpuid.h... no configure: error: gcc must provide the header
According to krinn on crossdev fails to build glibc for ppc -- cpuid.h [Solved], a newer gcc would solve the problem.
Build a newer GCC
# svn co svn://gcc.gnu.org/svn/gcc/branches/gcc-4_4-branch/ gcc-4.4Checked out revision 207582.# mkdir gcc-4.4-build# cd gcc-4.4-build# ../gcc-4.4/configure configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.2+. Try the --with-gmp and/or --with-mpfr options to specify their locations. Copies of these libraries' source code can be found at their respective hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/. See also http://gcc.gnu.org/install/prerequisites.html for additional info. If you obtained GMP and/or MPFR from a vendor distribution package, make sure that you have installed both the libraries and the header files. They may be located in separate packages.Now mpfr-devel needs to be built
# wget http://www.mpfr.org/mpfr-2.4.1/mpfr-2.4.1.tar.bz2# tar xjvf mpfr-2.4.1.tar.bz2# curl http://www.mpfr.org/mpfr-2.4.1/patches | patch -N -Z -p1# ./configure# make# make check# make installNot sure if the following was needed, but found it on http://gcc.gnu.org/wiki/InstallingGCC: For RPM-based systems, including Fedora and SUSE, you should install gmp-devel, mpfr-devel and libmpc-devel (or mpc-devel on SUSE) packages. The packages will install the libraries and headers in standard system directories so they can be found automatically when building GCC.gmp-devel and mpfr-devel was already installed, so just install libmpc-devel:
# yum install libmpc-develNow back to building GCC
# ../gcc-4.4/configure --with-mpfr=/usr/localconfigure: creating ./config.statusconfig.status: creating Makefile# make# make install
Now....back to installing GLIBC
# ../glibc-2.14/configure --prefix=/usr/local/mylib/ --with-binutils=/usr/local# make# env LANGUAGE=C LC_ALL=C make install
And, back to the whole point of this exercise, which to install OPAM
# cd opam-full-1.1.1# ./configure checking for gcc... /usr/local/bin/gcc ... checking whether /usr/local/bin/gcc accepts -g... yes ... config.status: creating Makefile.config config.status: creating src/core/opamVersion.ml config.status: creating doc/man-ext/opam-check.md Executables will be installed in /usr/local/bin Manual pages will be installed in /usr/local/share/man # make Build Successful in 13.00s. 840 jobs (parallelism 6.4x), 1124 files generated. make[1]: Leaving directory `/root/opam-full-1.1.1'# make install# opam init
Last changed: Mar 06 2014 at 11:45 AM
BackComments
No comment foundAdd Comment
- nstall OPAM on Springdale/RHEL/CentOS/SL 5.X
- Oracle Database 11g Release 2 Installation on RHEL/CentOS 6.x/5.x/4.x
- RHEL/CentOS/SL Linux 6.x使用EPEL 6的yum软件源
- Installing RHEL EPEL Repo on Centos 5.x or 6.x
- Install EPEL Repository On RHEL / CentOS / Scientific linux 6.x, 5.x
- IPMI on CentOS/RHEL
- Centos/RHEL 5.x 挂载 NTFS 分区
- CentOS/RHEL安装X Window
- RHEL/CentOS 5.x系统服务优化详解
- Centos 5.x RHEL 5.x 安装salt升级Zmq2.x 到Zmq4.x
- How to Enable EPEL Repository for RHEL/CentOS 7.x/6.x/5.x
- How to Enable EPEL Repository for RHEL/CentOS 7.x/6.x/5.x
- RHEL/CentOS 7.x/6.x/5.x开启EPEL仓库
- Compile FFmpeg on CentOS / RHEL / Fedora
- rabbitvcs Installation on RHEL/CentOS 5
- Install xrdp on CentOS 7 / RHEL 7
- Enable Serial Console on CentOS/RHEL 7
- Installing Docker on CentOS 7 / RHEL 7
- 字符串匹配之KMP算法
- 在线工具
- p123 28
- Activity中添加了布局文件界面不显示
- Git / SourceTree 使用
- nstall OPAM on Springdale/RHEL/CentOS/SL 5.X
- "Linux设备驱动开发详解" 笔记
- C#批量进制转换工具
- sip相关总结(2015-04-22)
- 搭建XMPP协议,实现自主推送消息到手机
- shape画图底部边框出不来的解决方法
- 用c语言实现遍历文件夹
- UITabBarItem 自定义
- Java数组基础综合案例