Luarocks 安装 async 失败
2018-2-23 2:58:53
收藏:0
阅读:171
评论:2
大家好,
我正在学习 Lua。从一个 Readme 文档上得知,我需要通过 Luarocks 安装"display",然而遇到了问题。当我输入"luarocks install display"时,
Installing https://raw.githubusercontent.com/torch/rocks/master/display-scm-0.rockspec...
Using https://raw.githubusercontent.com/torch/rocks/master/display-scm-0.rockspec... switching to 'build' mode
Missing dependencies for display:
async >= 1.0
luasocket >= 2.0
Using https://raw.githubusercontent.com/torch/rocks/master/async-scm-1.rockspec... switching to 'build' mode
Cloning into 'async'...
remote: Counting objects: 210, done.
remote: Compressing objects: 100% (184/184), done.
remote: Total 210 (delta 19), reused 172 (delta 19), pack-reused 0
Receiving objects: 100% (210/210), 403.80 KiB | 437.00 KiB/s, done.
Resolving deltas: 100% (19/19), done.
make LUA_BINDIR=/home/marvin/torch/install/bin
LUA_LIBDIR=/home/marvin/torch/install/lib
LUA_INCDIR=/home/marvin/torch/install/include
basename: missing operand
Try 'basename --help' for more information.
make -C lhttp_parser LUA=
LUA_BINDIR=/home/marvin/torch/install/bin
LUA_LIBDIR=/home/marvin/torch/install/lib
LUA_INCDIR=/home/marvin/torch/install/include
make[1]: Entering directory '/tmp/luarocks_async-scm-1-9028/async/lhttp_parser'
cc -c lhttp_parser.c -o lhttp_parser.o -Ihttp-parser -I
/home/marvin/torch/install/include -D_LARGEFILE_SOURCE -
D_FILE_OFFSET_BITS=64 -Wall -Werror -fPICCPPFLAGS=-fPIC make -C http-parser http_parser.o
make[2]: Entering directory '/tmp/luarocks_async-scm-1-9028/async/lhttp_parser/http-parser'
cc -fPIC -I. -DHTTP_PARSER_STRICT=0 -Wall -Wextra -Werror -O3 -c
http_parser.c
http_parser.c: In function ‘http_parser_parse_url’:
http_parser.c:2093:18: error: this statement may fall through [-Werror=implicit-fallthrough=]
found_at = 1;
~~~~~~~~~^~~
http_parser.c:2096:7: note: here
case s_req_server:
^~~~
cc1: all warnings being treated as errors
Makefile:35: recipe for target 'http_parser.o' failed
make[2]: *** [http_parser.o] Error 1
make[2]: Leaving directory '/tmp/luarocks_async-scm-1-9028/async/lhttp_parser/http-parser'
Makefile:17: recipe for target 'http-parser/http_parser.o' failed
make[1]: *** [http-parser/http_parser.o] Error 2
make[1]: Leaving directory '/tmp/luarocks_async-scm-1-9028/async/lhttp_parser'
Makefile:6: recipe for target 'lhttp_parser/lhttp_parser.so' failed
make: *** [lhttp_parser/lhttp_parser.so] Error 2
Error: Failed installing dependency:
https://raw.githubusercontent.com/torch/rocks/master/async-scm-1.rockspec - Build error: Failed building.
目前为止我已经搜索了很多但还没有找到相关解决方案,我认为问题存在于"async"的安装中,但是我不知道如何修复。 非常感谢您的帮助!
最好的祝愿, Marvin
点赞
用户541686
将一个名为 cc 的文件添加到你的 PATH 中某个目录下,并包含以下内容,并在该文件上运行 chmod +x cc:
/usr/bin/"${0##*/}" "$@" -Wno-implicit-fallthrough
2018-12-02 05:30:49
评论区的留言会收到邮件通知哦~
推荐文章
- Lua 虚拟机加密load(string.dump(function)) 后执行失败问题如何解决
- 我想创建一个 Nginx 规则,禁止访问
- 如何将两个不同的lua文件合成一个 东西有点长 大佬请耐心看完 我是小白研究几天了都没搞定
- 如何在roblox studio中1:1导入真实世界的地形?
- 求解,lua_resume的第二次调用继续执行协程问题。
- 【上海普陀区】内向猫网络招募【Skynet游戏框架Lua后端程序员】
- SF爱好求教:如何用lua实现游戏内调用数据库函数实现账号密码注册?
- Lua实现网站后台开发
- LUA错误显式返回,社区常见的规约是怎么样的
- lua5.3下载库失败
- 请问如何实现文本框内容和某个网页搜索框内容连接,并把网页输出来的结果反馈到另外一个文本框上
- lua lanes多线程使用
- 一个kv数据库
- openresty 有没有比较轻量的 docker 镜像
- 想问一下,有大佬用过luacurl吗
- 在Lua执行过程中使用Load函数出现问题
- 为什么 neovim 里没有显示一些特殊字符?
- Lua比较两个表的值(不考虑键的顺序)
- 有个lua简单的项目,外包,有意者加微信 liuheng600456详谈,最好在成都
- 如何在 Visual Studio 2022 中运行 Lua 代码?

我使用以下命令将我的 gcc 版本降级解决了问题:
sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install gcc-5 g++-5 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5希望这可以帮到您。