linux虚拟IP/yum Invalid version flag: if 错误//configure:错误:HTTP重写模块需要PCRE库。

  1. cd /etc/sysconfig/network-scripts

  2. ll

  3. vi ifcfg-ens33(每个人的文件名都不一样,要自己看文件名是什么)

  4. #确保ONBOOT=yes
    #ONBOOT的意思是系统在启动的时候是否激活网卡,只有激活网卡,才能进行网络通讯
    #如果文件没有下面的这些字段,就自己增加
     
    BOOTPROTO=static
    IPADDR=192.168.xxx.xxx  #你自己想要的ip地址
    NETMASK=255.255.255.0   #子网掩码
    ONBOOT=yes

  5. systemctl restart network命令重启网络 就ok了


1. 备份默认的yum
# mv /etc/yum.repos.d /etc/yum.repos.d.backup
 
2. 设置新的yum目录
# mkdir /etc/yum.repos.d
 
3. 下载阿里yum配置到该目录中,用wget,进行下载,
# yum install -y wget
# wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
 
4. 重建缓存
yum clean all
yum makecache
 
5. 升级所有包
yum upgrade -y
yum -y update:升级所有包同时,也升级软件和系统内核;(时间比较久)
yum -y upgrade:只升级所有包,不升级软件和系统内核,软件和内核保持原样。 


问题
./configure: error: the HTTP rewrite module requires the PCRE library.
You can either disable the module by using --without-http_rewrite_module
option, or install the PCRE library into the system, or build the PCRE library
statically from the source with nginx by using --with-pcre= option.
答案
yum -y install pcre-devel
 

  • 6
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值