【Linux apt-get 更换源】

1.问题描述:按照网上的教程编辑源列表文件后发现apt-get update 出现各种错误,导致更新失败

sudo vim /etc/apt/sources.list

2.分析:文件中的源地址语句 -> deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse ,红字部分要对应当前的系统版本。

3.解决方法:通过网页https://packages.ubuntu.com/查询版本,然后替换掉


【apr-util安装时的错误】

1.问题描述:./Configure时候报错 -> "xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory"

2.分析:缺少libexpat1-dev包

3.解决方案:apt-get install libexpat1-dev

备注:apr系列的安装参考博客 -> https://www.cnblogs.com/yuzhaokai0523/p/4382974.html


【./Configure Apache时报错1】

1.问题描述:

configure: WARNING: OpenSSL version is too old
no
checking whether to enable mod_ssl... configure: error: mod_ssl has been requested but can not be built due to prerequisite failures

2.分析:已经有了OpenSSL依赖包,但是没有OpenSSL-devel依赖包(Ubuntu下 -> libssl-dev)

3.解决方法:

sudo apt-get install libssl-dev

备注:Configure语句:./configure --prefix=/usr/local/httpd --enable-so --enable-ssl --enable-rewrite --with-pcre=/usr/local/pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-modules=most --enable-mpms-shared=all --with-mpm=event --with-included-apr


【./Configure Apache时报错2】

1.问题描述:

collect2: error: ld returned 1 exit status
Makefile:48: recipe for target 'htpasswd' failed
make[2]: *** [htpasswd] Error 1
make[2]: Leaving directory '/home/liyang/Downloads/httpd-2.4.37/support'
/home/liyang/Downloads/httpd-2.4.37/build/rules.mk:75: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/liyang/Downloads/httpd-2.4.37/support'
/home/liyang/Downloads/httpd-2.4.37/build/rules.mk:75: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1

2.分析:已经编译过apr和apr-util,还是会出错。

3.解决方法:

把解压好的apr和apr-util 复制到 /apache_path/srclib/ 中去,再重新Configure  //红字部分是Down下来解压后的Apache目录

备注:Configure语句:./configure --prefix=/usr/local/httpd --enable-so --enable-ssl --enable-rewrite --with-pcre=/usr/local/pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-modules=most --enable-mpms-shared=all --with-mpm=event --with-included-apr


【编译PHP后没有libphp7.so文件】

1.描述:/ust/local/htpd/modules/ 下没有libphp*.so 文件

2.分析:属于编译PHP时参数缺少的问题

3.解决方法:PHP解压目录下,加入红字部分

./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/lib --with-zlib-dir=/usr/lib --with-apxs2=/usr/local/httpd/bin/apxs 

【成功案例】(亲测)

https://blog.csdn.net/sunjinyan_1/article/details/80502117


【编译php7.0.17报错提示 undefined reference to `libiconv_open'】 

1.描述:

/opt/src/php-7.0./ext/iconv/iconv.c:: undefined reference to `libiconv_open'
/opt/src/php-7.0./ext/iconv/iconv.c:: undefined reference to `libiconv'
/opt/src/php-7.0./ext/iconv/iconv.c:: undefined reference to `libiconv_close'
ext/iconv/.libs/iconv.o: In function `_php_iconv_appendl':
/opt/src/php-7.0./ext/iconv/iconv.c:: undefined reference to `libiconv'
/opt/src/php-7.0./ext/iconv/iconv.c:: undefined reference to `libiconv'
ext/iconv/.libs/iconv.o: In function `_php_iconv_mime_decode':
/opt/src/php-7.0./ext/iconv/iconv.c:: undefined reference to `libiconv_open'
/opt/src/php-7.0./ext/iconv/iconv.c:: undefined reference to `libiconv_close'
/opt/src/php-7.0./ext/iconv/iconv.c:: undefined reference to `libiconv_close'
/opt/src/php-7.0./ext/iconv/iconv.c:: undefined reference to `libiconv_close'
/opt/src/php-7.0./ext/iconv/iconv.c:: undefined reference to `libiconv_open'
ext/iconv/.libs/iconv.o: In function `_php_iconv_substr':
---------------------
作者:大事龙
来源:CSDN
原文:https://blog.csdn.net/w_yunlong/article/details/69944433
版权声明:本文为博主原创文章,转载请附上博文链接!

2.解决方法:make 时增加 ZEND_EXTRA_LIBS=’-liconv’

PHP环境配置错误处理的更多相关文章

  1. windows phone7开发环境配置错误

    遇到下面这样一个问题:在配置windows phoe7开发环境的时候出现如下错误,以及相应的解决方案,希望对大家有所帮助. 装完环境后出现下面错误: [caption id="attachm ...

  2. OpenCV2.4.9 Qt5.3.1 开发环境配置错误原因与解决方案

    问题原因与解决办法 A.配置完成后,示例程序无法正常显示图片且程序无法运行 出现原因:环境变量未正确配置 解决办法:检查环境变量,添加缺失的环境变量 B.出"未定义的引用..."类 ...

  3. Linux环境配置错误记录

    1.  pip install --special_version  pip10. 版本. 使用命令: python -m pip install pip== 其中, -m 参数的意思是将库中的pyt ...

  4. java环境配置错误集锦

    eclipse生成的文件目录 D:\eeworkspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps 1.java. ...

  5. Sublime Text 2下搭建Python环境常见错误

    Sublime Text 2下搭建Python环境时,最容易出的错误就是Python环境配置错误,导致build(Ctrl+B)后没有任何反应. 关于Python编程环境的配置,网上很容易搜索到.先默 ...

  6. [原创]IIS7.5下配置ASP+PHP环境及错误处理(0xc0000135)

    IIS7.5下配置ASP+PHP环境及错误处理(0xc0000135) http://user.qzone.qq.com/93701178/blog/1398155812 操作系统更新至Win7或Wi ...

  7. MonkeyRunner于Windows在下面Eclipse开发环境的搭建步骤(并解决在线Jython配置错误的问题)

    网上有一shangdong_chu网友写了一篇文章介绍了如何Eclipse构造MonkeyRunner,他做了叙述一个很好的说明.但我对我的环境试验后会见Jython解析错误的问题,和制品缺少Pyde ...

  8. Java环境变量配置错误

    1,由于Java的环境变量配置错误,导致用到Java的编译过程中出现错误: 改正办法: wget http://download.oracle.com/otn-pub/java/jdk/8u181-b ...

  9. uboot环境配置

    uboot环境配置 通过配置uboot让它在启动过程中从tftp获取内核和设备树,并从在加载内核之后把通过启动参数将"从nfs挂载根文件系统"传入内核.这个配置主要是通过uboot ...

随机推荐

  1. js学习——函数

    函数声明 function funName(parameter){} 函数表达式,并把函数存储在变量x中 //不用给函数名,后续并不能直接用给定的函数名调用 var x = function(a){r ...

  2. FTRL优化算法

    飞机票 FTRL

  3. Oracle 中 nvl、nvl2、nullif、coalesce、decode 函数的用法详解

    NVL(EXPR1,EXPR2) NVL2(EXPR1,EXPR2,EXPR3) NULLIF(EXPR1,EXPR2) COALESCE(EXPR1,,..,EXPRn) decode ------ ...

  4. Confluence 6 配置快捷链接

    快捷链接提供了提供了一个在 Confluence 中访问从常用资源的快速方法.当你创建一个快捷链接的时候,你需要为你的快捷链接 URL 指派一个 Key,用户可以在 Confluence 中只输入这个 ...

  5. json的转换操作

    toJSON 把JS对象{ 'x': 2, 'y': 3 }转为JSON对象格式的字符串   不能转化字符串 比如"{ 'x': 2, 'y': 3 }" 可以转格式不标准的jso ...

  6. Distance

    1191: Distance 时间限制: 1 Sec  内存限制: 32 MB 题目描述 There is a battle field. It is a square with the side l ...

  7. stylus入门教程,在webstorm中配置stylus

    转载:https://www.cnblogs.com/wenqiangit/p/9717715.html#undefined   stylus特点 富于表现力.具有健壮性.功能丰富.动态编码 不需要写 ...

  8. bootstrap和easyui

    1.easyui:自定义的样式要在原先的easyui样式之前引入,这样自定义的样式才能把原先的样式覆盖,即放置顺序为: <link rel="stylesheet" href ...

  9. JQuery之左侧菜单

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  10. 005-2-Python文件操作

    Python文件操作(file) 文件操作的步骤: 打开文件,得到文件句柄并赋值给一个变量 通过句柄对文件进行操作 关闭文件(操作文件后记住关闭) 1.读写文件的基础语法: open() 将会返回一个 ...