PHP编译,执行make报错

本文涉及的产品
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
简介:

编译安装php 的时候, 执行make报错误

make: *** [ext/phar/phar.php] 错误 127


[root@localhost php-5.4.9]# mkdir /usr/local/webserver/mysql/include/mysql

 [root@localhost php-5.4.9]# ln -s /usr/local/webserver/mysql/include/* /usr/local/webserver/mysql/include/mysql

 [root@localhost php-5.4.9]# make ZEND_EXTRA_LIBS='-liconv'

抛错:

Generating phar.phar

/usr/local/src/php-5.4.9/sapi/cli/php: error while loading shared libraries: libiconv.so.2: cannot open shared object file: No such file or directory

make: *** [ext/phar/phar.php] Error 127


解决的方法如下:

#vi /etc/ld.so.conf

在里面加上一行

/usr/local/lib

2.然后运行/sbin/ldconfig

#/sbin/ldconfig

编译make

#make ZEND_EXTRA_LIBS='-liconv'

抛错:

Generating phar.phar

chmod: cannot access `ext/phar/phar.phar': No such file or directory

make: [ext/phar/phar.phar] Error 1 (ignored)


Build complete.

Don't forget to run 'make test'.

此处可以忽略 不过解决办法如下

#cd  ext/phar/

#cp ./phar.php  ./phar.phar

然后到php5.4文件夹

#make ZEND_EXTRA_LIBS='-liconv'

#make test

#make install



本文转自 维度2018 51CTO博客,原文链接:http://blog.51cto.com/xinsz08/1795767,如需转载请自行联系原作者

相关实践学习
基于CentOS快速搭建LAMP环境
本教程介绍如何搭建LAMP环境,其中LAMP分别代表Linux、Apache、MySQL和PHP。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助     相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
相关文章
|
4月前
|
PHP
PHP显示报错提示,开启display_errors的方法
PHP显示报错提示,开启display_errors的方法
46 0
|
8月前
|
PHP
PHP显示报错提示,开启display_errors的方法
PHP显示报错提示,开启display_errors的方法
287 0
|
9月前
|
PHP
PHP报错Call to undefined function utf8_decode()的解决方案
PHP报错Call to undefined function utf8_decode()的解决方案
|
11月前
|
SQL 前端开发 JavaScript
[从0开始]PHP+phpstudy留言板项目搭建教程及报错详析
PHP是在服务器端执行的脚本语言,适用于Web开发并可嵌入HTML中。 学习网站:PHP教程 | 菜鸟教程
161 0
|
测试技术 PHP
PHP: PhpStorm单元测试报错:PHPUnit Cannot open file
PHP: PhpStorm单元测试报错:PHPUnit Cannot open file
70 0
|
测试技术 PHP
PHP:laravel自定义Model报错:$table must not be defined/$table must be string
PHP:laravel自定义Model报错:$table must not be defined/$table must be string
102 0
|
PHP
PHP: Laravel报错Target class [App\\service\\AuthService] does not exist
PHP: Laravel报错Target class [App\\service\\AuthService] does not exist
96 0
|
消息中间件 PHP
PHP编译安装amqp扩展报错解决:/usr/bin/ld: cannot find -lrabbitmq
PHP编译安装amqp扩展报错解决:/usr/bin/ld: cannot find -lrabbitmq
81 0
PHP编译安装amqp扩展报错解决:/usr/bin/ld: cannot find -lrabbitmq
|
PHP
PHP使用explode报错:Undefined offset: 1
PHP使用explode报错:Undefined offset: 1
100 0
|
缓存 PHP
Composer报错: require(): Failed opening required ‘.../markbaker/matrix/.../functions/adjoint.php‘
Composer报错: require(): Failed opening required ‘.../markbaker/matrix/.../functions/adjoint.php‘
185 0