LAMP环境搭建踩坑实录

1.Linux下安装安装pcre-8.3p 报错configure: error: You need a C++ compiler for C++ support

解决方法:
yum install -y gcc gcc-c++


2. apache不支持chkconfig的解决方法

cp /usr/local/apache2/bin/apachectl /etc/rc.d/init.d/apche

但是在执行:

chkconfig --add httpd
chkconfig httpd on

的时候出现错误:

service httpd does not support chkconfig

解决办法:
打开 vi /etc/rc.d/init.d/apche
在#!/bin/sh 下面加上

#chkconfig: 2345 10 90
#description: Activates/Deactivates Apache Web Server

 

加上上面这两行就可以,#必须有

其中:2345是设为要启动的运行级别,10是启动优先级,90是杀死进程的优先级,谁优先谁先挂的意思。


3. Linux下编译安装mysql,make && make install时出现make:*** No targets specified and no makefile found.Stop.

解决方法:

第一、update最新版本系统软件

apt-get update

这个必须要执行后才可以安装我们的系统软件或者一键包。

第二、编译缺失关联软件

apt-get install gcc build-essential

编译执行完毕之后,我们在执行./configure && make这类的执行命令就可以解决问题。


4. 执行 cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/data4.时显示 Could NOT find Git (missing:  GIT_EXECUTABLE)

解决方法:yum install -y git


5. 执行 cmake -DCMAKE_INSTALL_PREFIX=/usr/local/mysql -DMYSQL_DATADIR=/usr/local/mysql/data4.时Could NOT find Curses (missing:  CURSES_LIBRARY CURSES_INCLUDE_PATH)


原因:缺少ncurses-devel包

解决方法:yum install -y ncurses-devel 

删除CMakeCache.txt f

ile=find / -name CMakeCache.txt 

m -f $file




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值