首页 > 编程语言 >APISIX源码安装问题解决

APISIX源码安装问题解决

时间:2023-11-10 19:56:27浏览次数:49  
标签:file package openresty lua 源码 usr install 安装 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.i686
  file /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.i686
  file /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.i686
  file /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.i686
  file /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.i686
  file /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.i686
  file /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.i686
  file /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.i686
  file /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.i686
  file /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.i686
  file /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.i686

Error 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”。

标签:file,package,openresty,lua,源码,usr,install,安装,APISIX
From: https://www.cnblogs.com/aquester/p/17824900.html

相关文章

  • Ubuntu20下安装NFS
    安装nfs-kernel-serveraptinstallnfs-kernel-server想好自己要把哪个目录作为NFS共享目录,创建目录mkdir/mydatavim/etc/exports添加我们自己想要共享的目录/mydata192.168.188.0/24(rw,sync,insecure,no_subtree_check,no_root_squash)重载数据exportfs......
  • xixa oraclelinux上kafka集群部署(一)----kafka安装
    kafka部署前提:需要安装jdk1.7以上版本、zookeeper官网下载:http://kafka.apache.org/quickstartkafka配置配置server.properties文件中zookeeper配置,如果集群应该怎么配置?还需要尝试配置kafka集群             在bin目录下面执行......
  • 智慧工地源码:建筑管理的新型方式
    智慧工地是利用物联网、云计算、大数据等技术,实现对建筑工地实时监测、管理和控制的一种新型建筑管理方式,其中,数据分析功能起着至关重要的作用。1、数据采集智慧工地中的数据采集主要通过传感器、监控摄像头等设备进行。这些设备可以实时采集到工地的环境数据、施工人员和设备信息......
  • Ansible自动化部署工具-role模式安装filebeat实际案例分析
    大家好,我是蓝胖子,前面一节我简单的讲了讲Ansible的架构和编排任务的语法,可以发现,通过playbook方式编排任务时,能够将任务文档化,但是在面对比较复杂且不同业务的任务编排时,维护playbook就变得复杂,所以Ansible产生了role模式针对复杂的任务进行编排工作。今天我们就通过一个实际的案......
  • 银河麒麟系统下openjdk安装及环境变量设置
    1、openjdk安装:A、检查java版本,终端命令:java-versionB、更新麒麟系统软件包列表,终端命令:sudoaptupdate查看列表 -->:aptlist  升级C、银河麒麟桌面环境提供了OpenJDK作为Java的官方实现(default-jdk,openjdk-11-jdk,openjdk-17-jdk等版本),终端命令:sudoa......
  • Jetson 安装conda
    jetson安装conda首先ssh到jetson上uname-aLinuxubuntu5.10.120-tegra#1SMPPREEMPTTueAug112:32:50PDT2023aarch64aarch64aarch64GNU/Linux打开下面链接conda链接找到对应的版本wget右键获得的链接bashAnaconda3-2023.07-2-Linux-aarch64.sh#安装......
  • (四)Spring源码解析:bean的加载流程解析
    一、概述在前几讲中,我们着重的分析了Spring对xml配置文件的解析和注册过程。那么,本节内容,将会试图分析一下bean的加载过程。具体代码,如下图所示:1.1>doGetBean(...)针对bean的创建和加载,我们可以看出来逻辑都是在doGetBean(...)这个方法中的,所以,如下就是针对于这个方法的整体源码注......
  • TiDB 源码编译之 TiProxy 篇
    作者:ShawnYanTiProxy简介TiProxy是一个基于Apache2.0协议开源的、轻量级的TiDB数据库代理,基于Go语言编写,支持MySQL协议。TiProxy支持负载均衡,接收来自应用程序的请求,然后将其发送到TiDB集群。支持自动故障转移,当后端TiDBServer发生故障,可以自动将连接转移到......
  • linux系统centos7安装docker
    1、Docker官网安装地址https://docs.docker.com/engine/install/centos/#prerequisites2、离线安装下载地址https://download.docker.com/linux/static/stable/x86_64/3、使用yum工具安装如果之前安装需要先卸载sudoyumremovedocker\docker-cl......
  • 编译spring5.2.x源码
    编译spring源码是学习spring的第一步,spring源码是用gradle编译的,在编译时会遇到一些问题,在此记录一下。下载spring源码第一步需要下载spring的源码,由于官方托管在github,国内访问github不通畅,这里就直接使用gitee的镜像仓库,在国内比较快,地址:https://gitee.com/mirrors/spring-fra......