和Python的pip对比lua的luarocks,luarocks并没有想象中那么简单好用!!这根本不是一个等级。
接触lua有半年了,最让我印象深刻的是这个语言比较好学,但是要安装某些库就和它有点格格不入了,并不是安装上了luarocks包管理器就会得心应手,而是各种入坑,和python的pip对比,lua的包管理器给人伤害明显。
举个栗子说说安装luasql或luasocket库,你以为的luarocks install luasql-sqlite3或mysql只是梦想的开始,当你点击回车后直接就是噩梦的结束,这个落差,无法言喻,伤害太深,当你尝试各种搜索,并不能搜到你想要的答案。所以这门语言感觉是真的被人遗忘了。为什么这么简单好用好学的语言会落后至如此地步,我为这感到可惜!!!
Microsoft Windows [版本 10.0.18363.1316]
(c) 2019 Microsoft Corporation。保留所有权利。
C:\Users\Robot>luarocks install luasql-sqlite3 Installing https://luarocks.org/luasql-sqlite3-2.6.0-1.rockspec Cloning into 'luasql'... remote: Enumerating objects: 149, done. remote: Counting objects: 100% (149/149), done. remote: Compressing objects: 100% (99/99), done. remote: Total 149 (delta 72), reused 72 (delta 36), pack-reused 0 eceiving objects: 86% (129/149), 60 Receiving objects: 100% (149/149), 104.13 KiB | 8.00 KiB/s, done. Resolving deltas: 100% (72/72), done. Note: switching to '22d4a911f35cf851af9db71124e3998d96fb3fa1'.
You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example:
git switch -c
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
luasql-sqlite3 2.6.0-1 depends on lua >= 5.1 (5.4-1 provided by VM) C:\local\MinGW-17.1\MinGW\bin\gcc.exe -O2 -c -o src/luasql.o -IC:\local\lua-5.4.2\dist\include src/luasql.c -Ic:/mingw/include C:\local\MinGW-17.1\MinGW\bin\gcc.exe -O2 -c -o src/ls_sqlite3.o -IC:\local\lua-5.4.2\dist\include src/ls_sqlite3.c -Ic:/mingw/include C:\local\MinGW-17.1\MinGW\bin\gcc.exe -shared -o luasql/sqlite3.dll src/luasql.o src/ls_sqlite3.o -Lc:/mingw -lsqlite3 C:\local\lua-5.4.2\dist\bin/lua54.dll -lm c:/local/mingw-17.1/mingw/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lsqlite3 collect2.exe: error: ld returned 1 exit status
Error: Build error: Failed compiling module luasql/sqlite3.dll
C:\Users\Robot>luarocks install luasql-mysql Installing https://luarocks.org/luasql-mysql-2.6.0-1.rockspec Cloning into 'luasql'... remote: Enumerating objects: 149, done. remote: Counting objects: 100% (149/149), done. remote: Compressing objects: 100% (99/99), done. remote: Total 149 (delta 72), reused 72 (delta 36), pack-reused 0 eceiving objects: 85% (127/ Receiving objects: 100% (149/149), 104.13 KiB | 7.00 KiB/s, done. Resolving deltas: 100% (72/72), done. Note: switching to '22d4a911f35cf851af9db71124e3998d96fb3fa1'.
You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example:
git switch -c
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
Error: Could not find header file for MYSQL No file mysql.h in c:/external/include No file mysql.h in c:/mingw/include No file mysql.h in c:/windows/system32/include You may have to install MYSQL in your system and/or pass MYSQL_DIR or MYSQL_INCDIR to the luarocks command. Example: luarocks install luasql-mysql MYSQL_DIR=/usr/local
C:\Users\Robot>where lua C:\local\lua-5.4.2\dist\bin\lua.exe
C:\Users\Robot>where luarocks C:\local\LuaRocks-3.5.0\luarocks.bat
C:\Users\Robot>luarocks install luasocket Installing https://luarocks.org/luasocket-3.0rc1-2.src.rock c:/local/mingw-17.1/mingw/bin/../lib/gcc/x86_64-w64-mingw32/9.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\temp\gcc\build-mingw-w64\mingw-w64-crt/../../src/mingw-w64-crt/crt/pseudo-reloc.c:150: undefined reference to `__acrt_iob_func' collect2.exe: error: ld returned 1 exit status
Error: Build error: Failed compiling module socket/core.dll
- 如何在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 代码?
- addEventListener 返回 nil Lua
- Lua中获取用户配置主目录的跨平台方法
- 如何编写 Lua 模式将字符串(嵌套数组)转换为真正的数组?