mac M2下虚拟机CentOS 8 安装上安装 Berkeley DB
问题:直接在centos8 yum安装db4-devel失败,只能手工安装
进入home目录,下载
wget http://download.oracle.com/berkeley-db/db-4.6.21.tar.gz
解压
tar -zxvf db-4.6.21.tar.gz
切到cd db-4.6.21的build_unix下
cd db-4.6.21
cd build_unix
安装:
../dist/configure --prefix=/usr/local/berkeleydb --enable-cxx
该步骤如果出现报错,看下报错内容: checking build system type... ../dist/config. guess: unable to guess system type This script, last modified 2007-05-17, has failed to recognize the operating system you are using. It is advised that you download the most up to date version of the config scripts from http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess and http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub If the version you run (../dist/config.guess) is already up to date, please send the following data and any information you think might be pertinent to <config-patches@gnu.org> in order to provide the needed information to handle your system.)
此时的处理方法是:
切到dist目录下,备份文件:
#cd ../dist
#mv config.guess config.guess.bak
#mv config.sub config.sub.bak
然后下载config.guess config.sub
#wget http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
#wget http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
再重新执行上面一句
然后编译安装
#make
#make install
通知系统Berkeley DB的动态链接库在/usr/local/berkeleydb/lib/目录
# echo '/usr/local/berkeleydb/lib/' >> /etc/ld.so.conf
# ldconfig
验证安装成功
ls /usr/local/berkeleydb/lib/libdb*
ls /usr/lib64/libdb*