最近雲計算課程有個作業要用到ceph,在編譯安裝ceph的時候發現缺少各種庫,瘋狂報錯。。。在此記錄。
感謝這篇文章給了很大幫助。雖然版本不一樣,但解決了大部分問題。
https://blog.csdn.net/je930502/article/details/50698669
實驗環境
- 操作系統:CentOS 7.3 kernel 3.10
- Ceph 版本:10.2.11
編譯和安裝ceph
解壓ceph源碼
tar zxvf ceph-10.2.11.tar.gz
編譯和安裝,依次輸入下面四條命令。
./autogen.sh
./configure
make -j24
make install
錯誤記錄
運行./autogen.sh
libtoolize failed
yum install -y libtool
運行 ./configure 報錯,主要是缺少各種依賴庫,報的錯如下:
g++ command could not found
yum install gcc gcc-c++ kernel-devel
configure: error: cython not found
yum install Cython
python-config not found
yum install python-devel
configure: error: libsnappy not found
yum install snappy-devel
configure: error: libleveldb not found
yum install leveldb-devel
configure: error: blkid/blkid.h not found (libblkid-dev, libblkid-devel)
yum install libblkid-devel
configure: error: libudev.h not found (libudev-dev, libudev-devel)
yum install libudev-devel
configure: error: expat.h not found (libexpat-devel)
yum install expat-devel
configure: error: keyutils
yum install keyutils-libs-devel
configure: error: no suitable crypto library found
yum install nss-devel
configure: error: no FUSE found (use –without-fuse to disable)
yum install fuse-devel
configure: error: no tcmalloc found (use –without-tcmalloc to disable)
yum install google-perftools-devel
configure: error: no libatomic-ops found (use --without-libatomic-ops to disable):
**yum install libatomic_ops-devel**
configure: error: libaio not found
yum install libaio-devel
configure: error: xfs/xfs.h not found (–without-libxfs to disable)
yum install xfsprogs-devel
configure: error: "Can’t find boost spirit headers"
yum install boost-devel
configure: error: ldap.h not found (openldap-dev, openldap-devel)
yum install openldap-devel
運行make -j24
g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report
採用這個方法:https://blog.csdn.net/hdyes/article/details/83303085
dd if=/dev/zero of=/swapfile bs=512M count=16
mkswap /swapfile
swapon /swapfile
編譯完後
swapoff /swapfile
rm /swapfile
make[3]: [compressor/zlib/libceph_zlib_la-CompressionZlib.lo] Error
yum install zlib-devel
Could not find git command.
yum install git
emm後面還沒安好,明天再更。