前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >安装LAMP环境遇到Sorry, I cannot run apxs

安装LAMP环境遇到Sorry, I cannot run apxs

作者头像
星哥玩云
发布2022-06-29 21:17:57
6790
发布2022-06-29 21:17:57
举报
文章被收录于专栏:开源部署开源部署

在linux下安装php时,(我安装的时5.2.6)phptar.gz压缩包解压缩之后。

在分配路径和关联扩展包时遇到错误如下:

--------------------------------------------------------

Sorry, I cannot run apxs. Possible reasons follow:

1. Perl is not installed

2. apxs was not found. Try to pass the path using --with-apxs2=/path/to/apxs

3. Apache was not built using --enable-so (the apxs usage page is displayed)

---------------------------------------------------

解决步骤:

1、根据不能run apxs 。cd 到apache的bin目录下运行./apxs 运行结果

----------------------------------------------------

bash: ./apxs: /replace/with/path/to/perl/interpreter: bad interpreter: No such file or directory

---------------------------------------------------------

2、vim apxs文件 找“/replace/with/path/to/perl/interpreter”关键字

在第一个行 :#!/replace/with/path/to/perl/interpreter -w

根据perl的安装目录 /usr/bin/perl

修改为:#! /usr/bin/perl -w

3、运行第一步。或者直接 ./configure ^^^^^

问题解决

configure 代码如下:

./configure--prefix=/usr/local/php/--with-config-file-path=/usr/local/php/etc/--with-apxs2=/usr/local/apache2/bin/apxs--with-MySQL=/usr/local/mysql/--with-libxml-dir=/usr/local/libxml2/--with-jpeg-dir=/usr/local/jpeg6/--with-freetype-dir=/usr/local/freetype/--with-gd=/usr/local/gd2/--with-mcrypt=/usr/local/libmcrypt/--with-mysqli=/usr/local/mysql/bin/mysql_config--enable-soap--enable-mbstring=all--enable-sockets

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
相关产品与服务
云数据库 SQL Server
腾讯云数据库 SQL Server (TencentDB for SQL Server)是业界最常用的商用数据库之一,对基于 Windows 架构的应用程序具有完美的支持。TencentDB for SQL Server 拥有微软正版授权,可持续为用户提供最新的功能,避免未授权使用软件的风险。具有即开即用、稳定可靠、安全运行、弹性扩缩等特点。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档