环境介绍
vagrant@ubuntu-xenial:/data/www/software$ sudo lsb_release -a # 查看系统版本
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.7 LTS
Release: 16.04
Codename: xenial # 别名
准备工作
sudo apt-get update # 访问源列表里的每个网址,并读取软件列表,然后保存在本地电脑。
sudo apt-get upgrade # 把本地已安装的软件,与刚下载的软件列表里对应软件进行对比更新软件。
编译安装Drizzle
- Drizzle组件安装 中文官网地址
- Drizzle 根据系统发行别名版本下载对应的Drizzle
- 考虑到大家找起来比较麻烦,这里提供一个百度云盘下载2011.07.21的包,点击即可下载
提取码:92v4
开始编译
tar -zxvf drizzle7-2011.07.21.tar.gz # 解压 cd drizzle7-2011.07.21/ # 进入源码文件夹 ./configure --without-server # 根据机器上的开发环境来生成相应的MakeFile sudo make libdrizzle-1.0 sudo make install-libdrizzle-1.0 export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
执行
./configure --without-server
可能遇到的问题
以及解决办法
错误1
checking for intltool >= 0.35... ./configure: line 22624: intltool-update: command not found found configure: WARNING: Your intltool is too old. You need intltool 0.35 or later.
解决1
sudo apt-get install intltool
错误2
checking for libprotobuf... no configure: WARNING: libprotobuf is required for drizzle7. On Debian this can be found in libprotobuf- dev. On RedHat this can be found in protobuf-devel.
解决2
sudo apt-get install libprotobuf-dev
错误3
checking for protobuf >= 2.1.0... no configure: WARNING: Your version of Google Protocol Buffers is too old. drizzle7 requires at least version 2.1.0 checking for protoc... no configure: WARNING: Couldn't find the protoc compiler. On Debian this can be found in protobuf- compiler. On RedHat this can be found in protobuf-compiler.
解决3
sudo apt-get install protobuf-compiler
错误4
checking for uuid/uuid.h... no checking for libuuid... no configure: WARNING: Couldn't find uuid/uuid.h. On Debian this can be found in uuid-dev. On RHEL 4 this can be found in e2fsprogs-devel and Fedora/RHEL 6 in libuuid-devel.
解决4
sudo apt-get install uuid-dev
错误5
configure: WARNING: libpcre is required for drizzle7. On Debian this can be found in libpcre3-dev. On RedHat this can be found in pcre-devel.
解决5
sudo apt-get install libpcre3-dev
错误6
configure: WARNING: libreadline is required for drizzle7. On Debian this can be found in libreadline5- dev. On RedHat this can be found in readline-devel.
解决6
sudo apt-get install libreadline-gplv2-dev
错误7
configure: WARNING: boost is required for drizzle7
解决7
sudo apt-get install libboost-all-dev
错误8
configure: WARNING: libcurl development lib not found. On Debian this is found in libcurl4-gnutls-dev. On RHEL5/Fedora11 it's in curl-devel. On RHEL6/Fedora12 it's in libcurl-devel. configure: WARNING: libcurl not found: not building auth_http configure: WARNING: libldap not found: not building auth_ldap plugin. checking for libpam... no configure: WARNING: Couldn't find PAM development support, pam_auth will not be built. On Debian, libpam is in libpam0g-dev. On RedHat it's in pam-devel. configure: WARNING: libgearman not found: not building gearman_udf plugin. configure: WARNING: libcurl development lib not found. On Debian this is found in libcurl4-gnutls-dev. On RHEL5/Fedora11 it's in curl-devel. On RHEL6/Fedora12 it's in libcurl-devel. configure: WARNING: libcurl not found: not building http_functions
解决8
sudo apt-get install libcurl4-gnutls-dev
错误9
configure: WARNING: libldap not found: not building auth_ldap plugin.
解决9
sudo apt-get install libldap2-dev
错误10
configure: WARNING: Couldn't find PAM development support, pam_auth will not be built. On Debian, libpam is in libpam0g-dev. On RedHat it's in pam-devel.
解决10
sudo apt-get install libpam0g-dev
错误11
configure: WARNING: libgearman not found: not building gearman_udf plugin.
解决11
libgearman1.1.12百度云盘下载安装
提取码:97j0
tar -zxvf gearmand-1.1.12.tar.gz cd gearmand-1.1.12/ ./configure make sudo make install sudo gearmand -d # 启动任务分发框架
错误12
configure: WARNING: mysqld not found in /home/vagrant/bin:/home/vagrant/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
解决12
sudo apt-get install mysql-server
错误13
checking for pg_config... no configure: WARNING: does not exist or it is not an exectuable file no
解决13
sudo apt-get install libpq-dev
错误14
configure: error: could not find gperf checking test for a working libevent... no configure: error: Unable to find libevent
解决14
sudo apt-get install gperf
错误15
checking test for a working libevent... no configure: error: Unable to find libevent
解决15
sudo apt-get install libevent-dev
错误16
configure: WARNING: MD5 not found in libgcrypt: not building md5 plugin. On Debian this is found in libgcrypt11-dev. On RedHat it is in libgcrypt-devel.
解决16
sudo apt-get install libgcrypt11-dev
错误17
checking for rabbitmq-server... no configure: WARNING: Couldn't find both rabbitmq c client and server support, rabbitmq plugin will not be built.
解决17
#安装rabbitmq-server sudo apt-get install erlang-nox sudo apt-get install rabbitmq-server sudo rabbitmq-server start #安装rabbitmq-c sudo apt-get install cmake git clone https://github.com/alanxz/rabbitmq-c cd rabbitmq-c mkdir build cd build cmake .. cmake --build .
错误18
vagrant@ubuntu-xenial:/data/www/software/rabbitmq-c-master/build$ cmake .. CMake Error at CMakeLists.txt:4 (cmake_minimum_required): CMake 3.12...3.18 or higher is required. You are running version 3.5.1 -- Configuring incomplete, errors occurred!
解决18
sudo apt remove --purge cmake hash -r sudo snap install cmake --classic
编译安装openResty并添加扩展Drizzle
tar -zxvf openresty-1.19.9.1.tar.gz && cd openresty-1.19.9.1 sudo ./configure --with-http_drizzle_module sudo make sudo make install #设置PATH PATH=/usr/local/openresty/nginx/sbin:$PATH export PATH #查看扩展 nginx -V