configure: error: You need 32-bits luac when using using lua from contrib.

参考文档:
在ubuntu容器中搭建交叉编译环境

我是在编译VLC时遇到的这个问题

环境:

Ubuntu23.04

当我执行configure --host=x86_64-w64-mingw32 --build=x86_64-pc-linux-gnu后报错

configure: error: You need 32-bits luac when using using lua from contrib.

如图:
在这里插入图片描述
直接执行安装命令则会提示找不到

sudo apt-get install lua5.2:i386

在这里插入图片描述

解决方法

添加外部architecture

dpkg --add-architecture i386

dpkg --add-architecture i386命令是用来在Ubuntu系统中添加i386架构的外部architecture。添加外部architecture可以让系统支持更多的架构,以便安装和运行特定架构的软件包。

添加i386的外部库

通过编辑/etc/apt/sources.list进行添加

vim /etc/apt/sources.list

在打开的文件中,找到以deb开头的行,将其复制并在deb后添加"[arch=i386]",如下所示:

# 修改前
deb http://cn.archive.ubuntu.com/ubuntu lunar-updates main restricted

# 修改后
deb http://cn.archive.ubuntu.com/ubuntu lunar-updates main restricted
deb [arch=i386] http://cn.archive.ubuntu.com/ubuntu lunar-updates main restricted

现在给出Ubuntu23.04/etc/apt/sources.list需要增加的内容

deb [arch=i386] http://cn.archive.ubuntu.com/ubuntu lunar main restricted
deb [arch=i386] http://cn.archive.ubuntu.com/ubuntu lunar-updates main restricted
deb [arch=i386] http://cn.archive.ubuntu.com/ubuntu lunar universe
deb [arch=i386] http://cn.archive.ubuntu.com/ubuntu lunar-updates universe
deb [arch=i386] http://cn.archive.ubuntu.com/ubuntu lunar multiverse
deb [arch=i386] http://cn.archive.ubuntu.com/ubuntu lunar-updates multiverse
deb [arch=i386] http://cn.archive.ubuntu.com/ubuntu lunar-backports main restricted universe multiverse
deb [arch=i386] http://cn.archive.ubuntu.com/ubuntu lunar-security main restricted
deb [arch=i386] http://cn.archive.ubuntu.com/ubuntu lunar-security universe
deb [arch=i386] http://cn.archive.ubuntu.com/ubuntu lunar-security multiverse

不同版本的内容不同,不要无脑复制!!!

更新apt软件包列表

sudo apt update

重新安装

sudo apt-get install lua5.2:i386

在这里插入图片描述

问题解决

  • 9
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

胡桃の壶

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值