安装PHP过程中,make步骤报错:(集中网络上各种解决方法)

(1)
-liconv -o sapi/fpm/php-fpm

/usr/bin/ld: cannot find -liconv

collect2: ld returned 1 exit status

make: *** [sapi/fpm/php-fpm] Error 1

[root@localhost php-5.4.5]#

初步定位是iconv的问题
解决方法 把libiconv卸载掉
进入libiconv源码目录执行
#make uninstall
#make clean

# ./configure –prefix=/usr/local/libiconv
# make
# make install

在进入php源码目录

./configure php时加上参数--with-iconv=/usr/local/libiconv

(2)
/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1
解决办法:安装包 yum install libtool-ltdl.x86_64 libtool-ltdl-devel.x86_64

(3)
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1

解决办法:

请安装lib所需的安装包

yum install ntp vim-enhanced gcc gcc-c++ gcc-g77 flex bison autoconf automake bzip2-devel ncurses-devel zlib-devel libjpeg-devel libpng-devel libtiff-devel freetype-devel libXpm-devel gettext-devel pam-devel kernel

执行安装完以后即可解决问题

make

make install

(4)
装php环境出现

ext/iconv/iconv.o: In function `php_iconv_stream_filter_ctor’:
/usr/local/soft/php-5.2.14/ext/iconv/iconv.c:2491: undefined reference to `libiconv_open’
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1

我的编译是这样:

./configure –prefix=/usr/local/php –with-gd=/usr/local/gd –with-jpeg-dir=/usr/local/jpeg –with-png-dir=/usr/local/png –with-freetype-dir=/usr/local/freetype –with-mysql=/usr/local/mysql –enable-fastcgi –enable-fpm

解决办法:

增加 – - disable-cli

(5)
编译php时
ext/xmlreader/php_xmlreader.o: In function `zim_xmlreader_XML':
/usr/local/src/php-5.2.8/ext/xmlreader/php_xmlreader.c:1109: undefined reference to `xmlTextReaderSetup'
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php-cgi] Error 1
解决办法:折腾了半天,最后先make clean 一下,然后把所有libxml2相关的包都装上重新编译就ok了。

(6)
运行可能报错 :我遇到xsl和mcrypt两个库报错,重新安装一下xsl的dev包就可以:
CentOS : yum install libxslt-devel libmcrypt-devel
Debian : apt-get install libxslt1-dev libmcrypt-dev
如果你有其他的库不满足,搜索一下该库,安装一下即可,这一步应该没有太多问题。
编译:
make
我在Debian下make正常,但在CentOS下却提示make错误,
make: *** [sapi/fpm/php-fpm] Error 1 错误中出现 libiconv,应该是iconv包问题,
使用下面的命令替换即可:
make ZEND_EXTRA_LIBS='-liconv'
完成后:
make test
make install

安装php时,make步骤报错make: *** [sapi/fpm/php-fpm] Error 1的更多相关文章

  1. 安装php时,make步骤报错make: *** [ext/gd/gd.lo] Error 1

    安装PHP时,make步骤报错make: *** [ext/gd/gd.lo] Error 1 /usr/local/src/LAMP+memcahed+catci/php-5.4.0/ext/gd/ ...

  2. CentOS7安装Docker时的异常报错与解决方法

    重要:有些人在vmware中安装了新的centos用于使用docker,但是往往会忽略了更换源与进行系统update, 这样会导致安装过程中出现诸多如下类问题,为了避免不必要的麻烦在安装docker前 ...

  3. 535 5.7.8 Error: authentication failed: generic failure安装EMOS时SMTP测试报错

    按照官方手册安装EMOS时候,进行到SMTP认证测试的时候报如下错: 535 5.7.8 Error: authentication failed: generic failure 原来是因为之前关闭 ...

  4. 安装mongoDB时,总是报错,启动不了

    安装教程地址:https://blog.csdn.net/fengtingyan/article/details/88371232 原文地址:https://blog.csdn.net/qq_2008 ...

  5. Jenkins安装时Web页面报错提示离线安装

    先跳过所有. 方法1 先看它的提示:”参考离线Jenkins安装文档“发现链接点不开,我还以为是被墙了呢,FQ以后还是打不开.看来这个参考文档是没有用滴.点击配置HTTP代理跳出如下界面:安装Jenk ...

  6. Uiautomator--出现报错“urllib3.exceptions.ProtocolError:<'Connection aborted.',error<10054,''>>”的解决方式!

    在运行uiautomator时,出现报错"urllib3.exceptions.ProtocolError:<'Connection aborted.',error<10054, ...

  7. 安装PHP过程中,make步骤报错:(集合网络上各种解决方法)

    安装PHP过程中,make步骤报错:(集合网络上各种解决方法) (1)-liconv -o sapi/fpm/php-fpm /usr/bin/ld: cannot find -liconv coll ...

  8. windows 8 安装 oracle 11g 报错:command line option syntax error,type command/? for help

    windows 8 安装 oracle 11g 报错:command line option syntax error,type command/? for help 在windows8操作系统上安装 ...

  9. 记一次安装python umysql模块的报错

    今天,在写一个python脚本的时候要用到数据库相关的umysql模块,但在引用的时候报没有此模块,第一反应就是去安装此模块,但是报没有找到pip命令. #pip install umysql -ba ...

随机推荐

  1. Why GEMM is at the heart of deep learning

    Why GEMM is at the heart of deep learning I spend most of my time worrying about how to make deep le ...

  2. 【C++基础之十五】内联函数

    1.优点 为什么使用内联函数,而不使用宏定义,虽然宏本身采用的展开来替代函数调用的压栈出栈返回等操作,提高了代码的效率,但是会有两个问题: (1)边际效应 宏只是展开代码而已,所以在一些操作符的优先级 ...

  3. parted命令分区

    http://soft.chinabyte.com/os/447/12439447.shtml http://blog.163.com/warking_xp/blog/static/103910320 ...

  4. COJ 2135 Day10-例1

    Day10-例1 难度级别:B: 运行时间限制:1000ms: 运行空间限制:256000KB: 代码长度限制:2000000B 试题描述 给定N个物品,价格分别为A1, A2…AN.设计一套面值互不 ...

  5. 数据结构(堆):SCOI 2009 生日礼物

    Description 小西有一条很长的彩带,彩带上挂着各式各样的彩珠.已知彩 珠有N个,分为K种.简单的说,可以将彩带考虑为x轴,每一个彩珠有一个对应的坐标(即位置).某些坐标上可以没有彩珠,但多个 ...

  6. 网络流(最大流) HDU 1565 方格取数(1) HDU 1569 方格取数(2)

      HDU 1565 方格取数(1) 给你一个n*n的格子的棋盘,每个格子里面有一个非负数.从中取出若干个数,使得任意的两个数所在的格子没有公共边,就是说所取的数所在的2个格子不能相邻,并且取出的数的 ...

  7. 不允许从数据类型 nvarchar 到 varbinary 的隐式转换

    一:错误截图 二:解决 数据库里面的数据类型错了,应该是varchar,而我选了varbinary.太粗心了!

  8. Single Number III——LeetCode

    Given an array of numbers nums, in which exactly two elements appear only once and all the other ele ...

  9. Binary Tree Preorder Traversal on LeetCode in Java

    二叉树的非递归前序遍历,大抵是很多人信手拈来.不屑一顾的题目罢.然而因为本人记性不好.基础太差的缘故,做这道题的时候居然自己琢磨出了一种解法,虽然谈不上创新,但简单一搜也未发现雷同,权且记录,希望于人 ...

  10. centos 安装node js环境

    node.js支持多种平台安装,其中Win平台安装比较简单,下面重点讲解下Linux平台的安装步骤.本文以CentOS平台为实例,不准备讲 解采取源码编译安装方式,而是采取在node.js网站下载已经 ...