error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status
Error from Command status line missing exit LD
2023-09-14 08:59:34 时间
安装MariaDB数据库最多用于linux系统中了,下文给各位介绍在Windows服务器Azure云编译安装MariaDB教程,希望本文能帮助到各位。
试用1元Windows Azure,带宽都是杠杠的。下面演示下Windows Azure下编译安装LNMP环境,系统环境是Ubuntu 14.04 TLS版
软件版本:
数据库:mariadb-10.0.13 Stable PHP:php-5.5.15 Stable Nginx:nginx/1.4.6 (Ubuntu)(这里Nginx采用Ubuntu的apt安装方式)
1.新建MySQL用户:
考虑到系统安装,新建的用户不能登录(nologin),编辑 vi /etc/shells 添加 “/usr/sbin/nologin”使系统支持创建nologin用户
useradd -m /app/mysql -s /usr/sbin/nologin -u 555 mysql
2.安装编译环境和安装MariaDB已经PHP依赖包:
apt-get install build-essential apt-get install libncurses5-dev cmake bison libxml2 libxml2-dev libxslt1-dev libcurl4-openssl-dev libbz2-dev libpcre3 libpcre3-dev unzip openssl libssl-dev libpng12-dev libfreetype6-dev libjpeg-dev libmcrypt-dev libldap2-dev libsasl2-dev libboost-dev
3.下载并编译安装MariaDB、PHP
wget http://cn2.php.net/get/php-5.5.15.tar.bz2/from/this/mirror
wget http://mirrors.neusoft.edu.cn/mariadb/mariadb-10.0.13/source/mariadb-10.0.13.tar.gz
1).安装目录分别为:/app/mysql 和 /app/php5
2).cmake . -DCMAKE_INSTALL_PREFIX=/app/mysql/ -DMYSQL_DATADIR=/app/mysql/data/ -DSYSCONFDIR=/app/mysql/etc/ -DMYSQL_UNIX_ADDR=/app/mysql/tmp/mysqld.sock -DMYSQL_TCP_PORT=3336 -DWITH_SSL=system -DWITH_FEDERATED_STORAGE_ENGINE=1 -DWITH_ZLIB=system -DENABLED_LOCAL_INFILE=1 -DDEFAULT_CHARSET=utf8 -DDEFAULT_COLLATION=utf8_general_ci -DMYSQL_USER=mysql
3)../configure --prefix=/app/php5 --with-config-file-path=/app/php5/etc/ --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-mysql-sock=/app/mysql/tmp/mysqld.sock --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap --enable-fpm --with-fpm-user=www-data --with-fpm-group=www-data --enable-opcache
Ubuntu14.04 编译安装新版本的PHP5.5可能会出现如下错误:
/usr/bin/ld: ext/ldap/.libs/ldap.o: undefined reference to symbol 'ber_strdup@@OPENLDAP_2.4_2' //usr/lib/x86_64-linux-gnu/liblber-2.4.so.2: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make: *** [sapi/cli/php] Error 1
遇到这种类似的情况,说明「./configure 」?]抓好一些环境变数值。解决方法,来自老外的一篇文章:
在PHP源码目录下 vi Makefile 找到 EXTRA_LIBS 行,在行末添加 ‘ -llber ‘ 保存退出再次make即可。
到此 Ubuntu编译安装MariaDB就完成了,关于Nginx连接PHP这里就不多说了,下面是此次编译的结果:http://azure0.iloxp.com/tz.php 这只是测试用的,截图留着哈:
相关文章
- Module Error (from ./node_modules/eslint-loader/index.js):解决办法
- error: converting to execution character set: Invalid or incomplete multibyte or wide character
- python:ERROR: No matching distribution found for Pillow==9.1.0的处理(Python 3.6.8)
- ERROR: Error in Log_event::read_log_event()
- [React] Fix "React Error: Rendered fewer hooks than expected"
- docker报错解决办法:Error response from daemon: Get https://registry-1.docker.io/v2/: proxyconnect tcp
- xception: no such table: xxx (code 1 SQLITE_ERROR): , while compiling: Select * from xxx where id= ?
- 成功解决Building wheel for dlib (setup.py) ... error ERROR: Command errored out with exit status 1:
- 成功解决pandas.errors.ParserError: Error tokenizing data. C error: Expected 1 fields in line 48, saw 2
- 成功解决 cl: 命令行 error D8021 :无效的数值参数“/Wno-cpp” 和 cl: 命令行 error D8021 :无效的数值参数“/Wno-unused-function”
- 成功解决pandas.errors.ParserError: Error tokenizing data. C error: Expected 1 fields in line 48, saw 2
- 成功解决Command "python setup.py egg_info" failed with error code 1 in C:UsersAppData
- RuntimeError: cuDNN error: CUDNN_STATUS_INTERNAL_ERROR
- qt-‘error: ‘‘this‘‘ cannot be implicitly captured in this context‘
- UNIX命令,统计当前目录(含子目录)下所有后缀为.log的文件中ERROR出现的行数
- error [03:10:02.393] [warning][process] Error: Request Timeout after 30000ms
- Etcd故障排除--recovering backend from snapshot error: failed to find database snapshot file (snap: snaps
- 解决harbor仓库拉镜像报错ErrImagePull: rpc error: code = Unknown desc = Error response from daemon: repository
- warning: initialization from incompatible pointer type error, forbidden解决(三十)
- Ubuntu之configure: error: Missing Xext.h, maybe to install libxext-dev packages(二十六)
- Mysql报错:Got fatal error 1236 from master when reading data from binary log: ‘Could not find first lo
- Docker查看日志报错Error response from daemon: configured logging driver does not support reading
- 【常见 Error & Bug】Vivado仿真报错 ERROR: [XSIM 43-3322] 解决方法