当前位置: 首页 > news >正文

APISIX源码安装问题解决

官网手册的安装语句:

curl https://raw.githubusercontent.com/apache/apisix/master/utils/install-dependencies.sh -sL | bash -

执行 install-dependencies.sh 报如下错误:

Transaction check error:file /usr/share/gcc-4.8.2/python/libstdcxx/v6/printers.py from install of libstdc++-4.8.5-44.tl2.1.x86_64 conflicts with file from package libstdc++-4.8.5-4.el7.i686file /usr/share/gcc-4.8.2/python/libstdcxx/v6/printers.pyc from install of libstdc++-4.8.5-44.tl2.1.x86_64 conflicts with file from package libstdc++-4.8.5-4.el7.i686file /usr/share/gcc-4.8.2/python/libstdcxx/v6/printers.pyo from install of libstdc++-4.8.5-44.tl2.1.x86_64 conflicts with file from package libstdc++-4.8.5-4.el7.i686file /usr/share/man/man5/cert8.db.5.gz from install of nss-3.90.0-2.tl2.x86_64 conflicts with file from package nss-3.19.1-19.el7_2.i686file /usr/share/man/man5/cert9.db.5.gz from install of nss-3.90.0-2.tl2.x86_64 conflicts with file from package nss-3.19.1-19.el7_2.i686file /usr/share/man/man5/key3.db.5.gz from install of nss-3.90.0-2.tl2.x86_64 conflicts with file from package nss-3.19.1-19.el7_2.i686file /usr/share/man/man5/key4.db.5.gz from install of nss-3.90.0-2.tl2.x86_64 conflicts with file from package nss-3.19.1-19.el7_2.i686file /usr/share/man/man5/pkcs11.txt.5.gz from install of nss-3.90.0-2.tl2.x86_64 conflicts with file from package nss-3.19.1-19.el7_2.i686file /usr/share/man/man5/secmod.db.5.gz from install of nss-3.90.0-2.tl2.x86_64 conflicts with file from package nss-3.19.1-19.el7_2.i686file /usr/share/man/man5/ldap.conf.5.gz from install of openldap-2.4.44-25.tl2.x86_64 conflicts with file from package openldap-2.4.40-8.el7.i686file /usr/share/man/man5/ldif.5.gz from install of openldap-2.4.44-25.tl2.x86_64 conflicts with file from package openldap-2.4.40-8.el7.i686Error Summary

解决办法为执行下列语句删除冲突:

yum -y remove libstdc++-4.8.5-4.el7.i686

当 install-dependencies.sh 执行 linux-install-luarocks.sh 时报下列错误:

Configuring LuaRocks version 3.8.0...Lua version detected: 5.1
Lua interpreter found: /usr/bin/lua
lua.h for Lua 5.1 not found (tried /usr/include/lua/5.1/lua.h /usr/include/lua5.1/lua.h /usr/include/lua-5.1/lua.h /usr/include/lua51/lua.h /usr/include/lua.h)If the development files for Lua (headers and libraries)
are installed in your system, you may need to use the
--with-lua or --with-lua-include flags to specify their location.If those files are not yet installed, you need to install
them using the appropriate method for your operating system.Run ./configure --help for details on flags.

从 https://www.lua.org/download.html 下载 lua-5.4.6,解压后修改其中的 Makefile 文件,将 INSTALL_TOP 的值改为:

INSTALL_TOP= /usr/local/lua-5.4.6

执行:

make&&make install

成功后再执行:

ln -s /usr/local/lua-5.4.6 /usr/local/lua

更新 PATH,指向 lua-5.4.6:

export PATH=/usr/local/lua:$PATH

重新执行 install-dependencies.sh 完成安装。

在本文写作时,“APISIX_VERSION=‘3.6.1’” 并不可用,需改为“APISIX_VERSION=‘3.6.0’”。

执行“make deps”时报错:

[ info ] WARNING: OpenResty not found. You have to install OpenResty and add the binary file to PATH before install Apache APISIX.

下面这个错误同 openresty.repo 有关:

failure: repodata/repomd.xml from openresty: [Errno 256] No more mirrors to try.
https://openresty.org/package/centos/2.6/x86_64/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found

上面这个错误是因为 openresty.repo 配置的 baseurl 实际不存在:

# cat /etc/yum.repos.d/openresty.repo
[openresty]
name=Official OpenResty Open Source Repository for CentOS
baseurl=https://openresty.org/package/centos/$releasever/$basearch
skip_if_unavailable=False
gpgcheck=1
repo_gpgcheck=0
gpgkey=https://openresty.org/package/pubkey.gpg
enabled=1
enabled_metadata=1

在 CentOS 7.9 上查 basearch 和 releasever 的取值:

# python -c 'import yum, json; yb = yum.YumBase(); print json.dumps(yb.conf.yumvar, indent=2)'
Loaded plugins: fastestmirror
{"arch": "ia32e", "basearch": "x86_64", "releasever": "2.6", "uuid": "d20a9386-c8d2-225a-8e8d-916f99f582d1"
}

实际存在的,如:

https://openresty.org/package/centos/7/x86_64/repodata/repomd.xml

做下列改动就能通过:

# cat /etc/yum.repos.d/openresty.repo 
[openresty]
name=Official OpenResty Open Source Repository for CentOS
#baseurl=https://openresty.org/package/centos/$releasever/$basearch
baseurl=https://openresty.org/package/centos/7/x86_64/
skip_if_unavailable=False
gpgcheck=1
repo_gpgcheck=0
gpgkey=https://openresty.org/package/pubkey.gpg
enabled=1
enabled_metadata=1

下面这个错误是因为 /usr/local 下没有 openresty:

# make deps
[ info ] WARNING: OpenResty not found. You have to install OpenResty and add the binary file to PATH before install Apache APISIX.
exit 1

执行:

yum -y install openresty

安装 openresty,再执行 APISIX 的“make deps”。

http://www.lryc.cn/news/227611.html

相关文章:

  • 基于SSM和vue的在线购物系统
  • 力扣100题——子串
  • 自然语言处理中的文本聚类:揭示模式和见解
  • C/C++内存管理——“C++”
  • jsp小知识
  • Flutter:改变手机状态栏颜色,与appBar状态颜色抱持一致
  • 深入分析:一体化运维监控在金融行业的关键作用
  • 物联网AI MicroPython学习之语法 network网络配置模块
  • java根据前、中序遍历结果重新生成二叉树
  • 利用检测结果实现半自动标注
  • Android修行手册 - 万字梳理JNI开发正确技巧和错误缺陷
  • C++学习 --类和对象之继承
  • Redis之缓存
  • Redis6的IO多线程分析
  • kali linux安装教程
  • React进阶之路(四)-- React-router-v6、Mobx
  • 55基于matlab的1.高斯噪声2.瑞利噪声3.伽马噪声4.均匀分布噪声5.脉冲(椒盐)噪声
  • Codeforces Round 908 (Div. 2)视频详解
  • 电路综合-基于简化实频的SRFT集总参数切比雪夫低通滤波器设计
  • Linux系统编程——实现cp指令(应用)
  • 20231112_DNS详解
  • 使用ssh上传数据到阿里云ESC云服务上
  • 【408】计算机学科专业基础 - 数据结构
  • SpringSpringBoot自动装配
  • k8s 部署mqtt —— 筑梦之路
  • 模型部署:量化中的Post-Training-Quantization(PTQ)和Quantization-Aware-Training(QAT)
  • C++模板元模板(异类词典与policy模板)- - - 题目答案
  • 二十三种设计模式全面解析-组合模式与迭代器模式的结合应用:构建灵活可扩展的对象结构
  • postgresql|数据库|提升查询性能的物化视图解析
  • Unity中Shader雾效的原理