lnmp mysql 哪个好_lamp与lnmp的选择
安装 PHP 5.4.3 报 configure error xml2-config notfound. please check your libxml2 installation 错误
检查是否安装了libxm包
[root@rh-linux software]#rpm -qa |grep libxml2
libxml2-2.6.26-2.1.12libxml2-python-2.6.26-2.1.12重新安装libxml2和libxml2-devel包, yum安装的时候发现新版本会提示更新,需要更新的可以更新,不要跳过就行了。
[root@rh-linux /]#yum install libxml2
[root@rh-linux /]#yum install libxml2-devel -y
安装完之后查找xml2-config文件是否存在
[root@rh-linux /] #find / -name "xml2-config"
/usr/bin/xml2-config
如果存在的话重新安装php
[root@rh-linux php-5.4.3]#./configure
[root@rh-linux php-5.4.3]#make
[root@rh-linux php-5.4.3]#make install
安装好php后别忘了配置下php.ini 文件,
[root@rh-linux php-5.4.3]#cp php.ini-production /usr/local/lib/php.ini
也可以直接在 make install 后面加一个编译参数 --with-config-file-path=/usr/local/php/etc 指定自己的php.ini路径 然后从源码里面 cp过去php.ini 源码里面有个php.ini-development和php.ini-production 如果不是本地调试模式的 选择后者
[libiconv_open]collect2: ld returned1 exit status make: *** [sapi/cgi/php-cgi] 错误 1编译php时出现错误
xmlrpc/libxmlrpc/encodings.c:73: undefined reference to `libiconv_open'xmlrpc/libxmlrpc/encodings.c:81: undefined reference to `libiconv'xmlrpc/libxmlrpc/encodings.c:101: undefined reference to `libiconv_close'collect2: ld returned 1exit status
make:*** [sapi/cgi/php-cgi] 错误 1是由于没有安装 libiconv包,又没有yum源,无法通过yum直接安装,还需要自己手动来。
先安装libiconv:wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz
tar-zxvf libiconv-1.14.tar.gz
cdlibiconv-1.14./configure--prefix=/usr/local
make
sudomakeinstall
然后重新configure php,再make就ok..
Example1
2
3./configure--with-iconv=/usr/local
makeclean
make
配置如果“configure:error: libpng.(a|so) notfound.”错误。
解决方法:
根据报错发现是因为libpng.so和libpng.a找不到,检查libpng的相关软件是否已经安装,如果已安装,需要将“/usr/lib64/libpng*”库文件拷贝到“/usr/lib”下。执行如下命令:1[root@web/]#cp -frp /usr/lib64/libpng* /usr/libyuanyi
原因:因为configure一般的搜索编译路径为/usr/lib/下,而x64位的系统默认在“/usr/lib64”下,因此需要拷贝到“/usr/lib”目录下。
如果报configure: error: libjpeg.(a|so) notfound错误解决方法和上面的解决方法类似
安装PHP出现make:*** [sapi/cli/php] Error 1解决办法
ext/iconv/.libs/iconv.o: In function `php_iconv_stream_filter_ctor’:/home/king/php-5.2.13/ext/iconv/iconv.c:2491: undefined reference to `libiconv_open’
collect2: ld returned1exit status
make:*** [sapi/cli/php] Error 1[root@test php-5.2.13]#vi Makefile
在安裝 PHP 到系统中时要是发生「undefined reference to libiconv_open’」之类的错误信息,那表示在「./configure 」沒抓好一些环境变数值。错误发生点在建立「-o sapi/cli/php」是出错,没給到要 link 的 iconv 函式库参数。 解决方法:编辑Makefile 大约77 行左右的地方: EXTRA_LIBS = ….. -lcrypt 在最后加上 -liconv,例如: EXTRA_LIBS = ….. -lcrypt -liconv 然后重新再次 make 即可。
或者用另一种办法
make ZEND_EXTRA_LIBS=’-liconv’
ln-s /usr/local/lib/libiconv.so.2 /usr/lib64/注:加上-liconv,需要确认已安装libiconv
libiconv安装
http://www.gnu.org/software/libiconv/
#tar -zxvf libiconv-1.9.2.tar.gz#cd libiconv-1.9.2#./configure –prefix=/usr/local
#make#make install#make clean
再次安装 PHP时又报错
ext/standard/info.o: In function `php_info_print_request_uri’:
/root/php-5.4.16/ext/standard/info.c:97: undefined reference to `sapi_globals’
ext/standard/info.o: In function `php_print_gpcse_array’:
/root/php-5.4.16/ext/standard/info.c:209: undefined reference to `executor_globals’
ext/standard/info.o: In function `php_print_info’:
/root/php-5.4.16/ext/standard/info.c:874: undefined reference to `executor_globals’
/root/php-5.4.16/ext/standard/info.c:877: undefined reference to `executor_globals’
/root/php-5.4.16/ext/standard/info.c:880: undefined reference to `executor_globals’
/root/php-5.4.16/ext/standard/info.c:883: undefined reference to `executor_globals’
collect2: ld returned 1 exit status
make: *** [sapi/cli/php] 错误 1出现这样的错误信息可能是以前用不同的参数编译过PHP。
解决方法:执行make clean删除上次的编译结果,然后再重新编译就OK了。
make ZEND_EXTRA_LIBS=’-liconv’/libxmlrpc/encoding.c:101:undefined reference to 'libiconv_close'collect2: ld returned1exit status
make:*** [sapi/fpm/php-fpm] Error 1解决方法:#make ZEND_EXTRA_LIBS='-liconv'
错误一、编译php出错/php-5.3.2/ext/fileinfo/libmagic/apprentice.c:147:internal compiler error:Segmentation fault
Please submit a full bug report,
with preprocessed sourceifappropriate.
See forinstructions.
The bugis not reproducible,so it is likely a hardware orOS problem.
make:*** [ext/fileinfo/libmagic/apprentice.lo] Error 1解决方法:内存大于1G即可,这是php5.3.2的一个bug--------------------------------------------------------------------错误二、重新构造configure文件出错
./buildconf --force
Forcing buildconf
buildconf:checking installation…
buildconf:autoconf version2.59(ok)
buildconf:Your version of autoconf likely contains buggy cache code.
Running vcscleanforyou.
To avoid this,install autoconf-2.13.
Can't figure out your VCS, not cleaning.
解决方法:编译安装autoconf-2.13再将autoconf-2.13的auotconf文件至/usr/local/autoconf--------------------------------------------------------------------错误三、编译时缺少库
configure: error: libXpm.(a|so) notfound.
解决方法:yum install libXpm-devel--------------------------------------------------------------------错误四、编译时缺少gmp.h文件
configure: error: Unable to locate gmp.h
解决方法:yum install gmp-devel--------------------------------------------------------------------错误五
Configure: error: xml2-config notfound. Please check your libxml2 installation.
解决方法:#yum install libxml2 libxml2-devel (For Redhat & Fedora)
#aptitude install libxml2-dev (For ubuntu)
--------------------------------------------------------------------错误六
Checkingfor pkg-config… /usr/bin/pkg-config
configure: error: Cannot find OpenSSL’s解决方法:#yum install openssl openssl-devel
--------------------------------------------------------------------错误七
Configure: error: Please reinstall the BZip2 distribution
解决方法:#yum install bzip2 bzip2-devel
--------------------------------------------------------------------错误八
Configure: error: Please reinstall the libcurl distribution-easy.h should bein /include/curl/解决方法:#yum install curl curl-devel (For Redhat & Fedora)
#install libcurl4-gnutls-dev (For Ubuntu)
--------------------------------------------------------------------错误九:
Configure: error: libjpeg.(also)notfound.
解决方法:#yum install libjpeg libjpeg-devel
--------------------------------------------------------------------错误十
Configure: error: libpng.(also)notfound.--------------------------------------------------------------------解决方法:#yum install libpng libpng-devel
--------------------------------------------------------------------错误十一
Configure: error: freetype.hnotfound.
解决方法:#yum install freetype-devel
--------------------------------------------------------------------错误十二
Configure: error: Unable to locate gmp.h
解决方法:#yum install gmp-devel
--------------------------------------------------------------------错误十三
Configure: error: Cannot find MySQL header files under/usr.
Note that the MySQL client libraryis notbundled anymore!
解决方法:#yum install mysql-devel (For Redhat & Fedora)
#apt-get install libmysql++-dev (For Ubuntu)
--------------------------------------------------------------------错误十四
Configure: error: Please reinstall the ncurses distribution
解决方法:#yum install ncurses ncurses-devel
--------------------------------------------------------------------错误十五
Checkingfor unixODBC support… configure: error: ODBC header file ‘/usr/include/sqlext.h’ notfound!
解决方法:#yum install unixODBC-devel
--------------------------------------------------------------------错误十六
Configure: error: Cannot find pspell
解决方法:#yum install pspell-devel
--------------------------------------------------------------------错误十七
configure: error: mcrypt.hnotfound. Please reinstall libmcrypt.
解决方法:#yum install libmcrypt libmcrypt-devel (For Redhat & Fedora)
#apt-get install libmcrypt-dev
--------------------------------------------------------------------错误十八
Configure: error: snmp.hnotfound. Check your SNMP installation.
解决方法:#yum install net-snmp net-snmp-devel
--------------------------------------------------------------------错误十九
configure:error:Cannot find ldap.h
解决方法:#yum install openldap-devel openldap
错误二十
configure:error:xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
解决方法:#yum install libxslt libxslt-devel
错误二十一
checkingfor libevent >=1.4.11 install prefix… configure: error: Could not find libevent >=1.4.11 in /usr/local/php
解决方法:
安装libevent-1.4.11以上版本至/usr/local
tar xzvf libevent-1.4.14-stable.tar.gz
cd libevent-1.4.14-stable
./configure --prefix=/usr/local
make&&make install
在编译。/configure时添加--with-libevent-dir=/usr/local即可
错误二十二
cc1: out of memory allocating2036 bytes after a total of 81846272bytes
make:*** [ext/date/lib/parse_date.lo] Error 1报错:/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
make:*** [sapi/fpm/php-fpm] Error 1
解决方法:
安装ltdl
#cd /libmcrypt-2.5.7/libltdl/ # 可以通过 yum install libtool-ltdl-devel 解决
#./configure --enable-ltdl-install
#ldconfig
#cd php-5.3.6
#make ZEND_EXTRA_LIBS='-liconv'
lnmp mysql 哪个好_lamp与lnmp的选择相关推荐
- lnmp mysql主从_LNMP linux下mysql主从复制 _好机友
mysql主从复制主要作用是为了降低主服务器mysql的读压力. 文章背景: 1.在本地搭建两个linux虚拟机,其主服务器ip为192.168.0.1,从服务器ip为192.168.0.2. 2.主 ...
- 如何在Linux中使用LNMP一键安装包快速安装LNMP环境
先看看 LNMP安装教程 https://lnmp.org/install.html 安装步骤: 1.使用putty或类似的SSH工具登陆VPS或服务器: 登陆后运行:screen -S lnmp 如 ...
- lnmp一键安装包 安装php-fpm,LNMP一键安装包的Nginx 502 Bad Gateway错误可能原因及解决方法...
作者:licess 发布时间:2013年02月17日 分类:常见问题 第一种原因:第一种原因:安装lnmp一键安装包时php没安装成功而出现502 Bad Gateway,从0.9开始只要安装成功或失 ...
- memcached 穿透mysql_memcached 和 mysql 结合使用的两种实现选择?
memcached 和 mysql 结合使用的两种实现选择? 这是我在知乎上抛出的一个问题"我们的应用已经决定采mysql+memcached 的方式,针对的数据库版本是 mysql 5.1 ...
- lnmp mysql 路径_LNMP笔记:更改网站文件和MySQL数据库的存放目录
配置好LNMP环境以后,默认的网站目录和数据库存放目录都在系统盘,所以我们需要将它们转移到数据盘. 更改网站文件目录 如果你使用的是军哥的lnmp一键安装包,那默认的虚拟主机配置环境在 /usr/lo ...
- linux 下mysql等php的安装 lnmp
访问https://lnmp.org/install.html按照步骤安装 当下载执行完 wget -c http://soft.vpser.net/lnmp/lnmp1.3.tar.gz & ...
- lnmp mysql 自动关闭_mysql总是自动停止 日志提示Plugin ‘FEDERATED’ is disabled的解决办法...
服务器环境LNMP Centos6.5 64位, 这两天新买的服务器MySQL总是自动停止,查了日志 9:13:57 [Note] MySQL: Normal shutdown 9:13:57 [No ...
- lnmp mysql 远程访问_LNMP环境下 远程连接mysql数据库
一.为了安全起见,lnmp环境是禁止远程连接的,他会删除iptables里面的3306端口的防火墙规则 一.如果是phpmydmin 那要把权限里要远程连接的用户主机改成 * 参考: https:/ ...
- lnmp 查看mysql版本_MySQL数据库之Lnmp环境中php-mysql版本问题
本文主要向大家介绍了MySQL数据库之Lnmp环境中php-mysql版本问题 ,通过具体的内容向大家展现,希望对大家学习MySQL数据库有所帮助. 操作系统:CentOS release 6.7 ( ...
最新文章
- 根据名称获得treeview节点_冶金行业首个!中冶赛迪正式启动工业互联网标识解析二级节点建设...
- 1067. [SCOI2007]降雨量【线段树】
- Vue.js 进入/离开 列表过渡
- Centos7安装netstat及简单使用
- 这份网约车安全乘车指南,请务必收下!
- android webviwe 头布局,Android布局问题,带有WebView下方的按钮
- Guava入门~Strings
- ROS入门 TX2+Turtlebot+Kinect2.0配置记录
- 20以内的素数编码C语言,用C语言 输出100以内的素数,
- bp matlab 训练参数,基于MATLABBP神经网络设计与训练.PDF
- (译)C++11中的Move语义和右值引用
- Matlab实用代码——直方图的绘制并在单个直方图上标注对应数字
- zabbix 5.0所有依赖包_Zabbix“专家坐诊”第82期问答汇总
- shell 判断目录还是文件
- HTML+CSS【超浪漫的表白网页代码】不会编程也能制作送给女朋友的表白网站 (1)
- 可行性研究报告——机房收费系统
- CISP 考试教材《第 4 章 知识域:业务连续性》知识整理
- min-max之间取随机数公式
- 如何把psd格式转为html,将psd转化为HTML网页详情讲解
- 电子技术在计算机的应用与未来展望,电子信息技术的应用特点与未来发展趋势研究...
热门文章
- 【带你重拾Redis】Redis 主从架构
- android Camera照相机技术(一)
- python:自动化测试 playwright 库上传和下载
- wordpress php 7 速度优化,WordPress优化提速必做的6种操作代码篇
- linux 下mysql的管理,Linux下 MySQL安装和基本管理
- java 企业付款_java实现微信企业付款到个人功能
- 历史版本_DNF:历史版本十大经典地图,没经历过那个时代的人不会明白的
- python函数速查_Python语法速查: 7. 函数基础
- Opencv cv2.KalmanFilter 鼠标跟踪
- java建一个conversion,Scala中的JavaConverters和JavaConversions有什么区别?