【问题标题】:Error installing lua-requests安装 lua 请求时出错
【发布时间】:2018-12-26 08:54:30
【问题描述】:

我需要安装 luarocks 包lua-requests 但是执行sudo luarocks install lua-requests会返回这个错误:

Installing https://luarocks.org/lua-requests-1.2-0.src.rock
Missing dependencies for lua-requests 1.2-0:
   xml (not installed)

lua-requests 1.2-0 depends on xml (not installed)
Installing https://luarocks.org/xml-1.1.3-1.src.rock

Error: Failed installing dependency: https://luarocks.org/xml-1.1.3-1.src.rock - Could not find library file for STDC++
  No file libstdc++.a in /usr/local/lib
  No file libstdc++.a in /usr/local/lib/x86_64-linux-gnu
  No file libstdc++.a in /usr/local/lib64
  No file libstdc++.so in /usr/local/lib
  No file libstdc++.so in /usr/local/lib/x86_64-linux-gnu
  No file libstdc++.so in /usr/local/lib64
  No file matching libstdc++.so.* in /usr/local/lib
  No file matching libstdc++.so.* in /usr/local/lib/x86_64-linux-gnu
  No file matching libstdc++.so.* in /usr/local/lib64
  No file libstdc++.a in /usr/lib
  No file libstdc++.a in /usr/lib/x86_64-linux-gnu
  No file libstdc++.a in /usr/lib64
  No file libstdc++.so in /usr/lib
  No file libstdc++.so in /usr/lib/x86_64-linux-gnu
  No file libstdc++.so in /usr/lib64
  No file matching libstdc++.so.* in /usr/lib
  No file matching libstdc++.so.* in /usr/lib/x86_64-linux-gnu
  No file matching libstdc++.so.* in /usr/lib64
  No file libstdc++.a in /lib
  No file libstdc++.a in /lib/x86_64-linux-gnu
  No file libstdc++.a in /lib64
  No file libstdc++.so in /lib
  No file libstdc++.so in /lib/x86_64-linux-gnu
  No file libstdc++.so in /lib64
  No file matching libstdc++.so.* in /lib
  No file matching libstdc++.so.* in /lib/x86_64-linux-gnu
  No file matching libstdc++.so.* in /lib64
You may have to install STDC++ in your system and/or pass STDC++_DIR or STDC++_LIBDIR to the luarocks command.
Example: luarocks install xml STDC++_DIR=/usr/local

但是在执行sudo luarocks install xml STDC++_DIR=/usr/local 时出现以下错误:

Error: Invalid assignment: STDC++_DIR=/usr/local

如何安装lua-requests?


编辑:执行sudo apt install libstdc++ 会返回:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libstdc++6-5-dbg-ppc64-cross' for regex 'libstdc+'
...
Note, selecting 'libstdc++6-4.2-dbg-m68k-cross' for regex 'libstdc+'
Note, selecting 'libstdc++6-arm64-cross' instead of 'libstdc++6-arm64-dcv1'
...
Note, selecting 'libstdc++6-sparc64-cross' instead of 'libstdc++6-sparc64-dcv1'
libstdc++-5-dev is already the newest version (5.4.0-6ubuntu1~16.04.10).
libstdc++-5-dev set to manually installed.
libstdc++6 is already the newest version (5.4.0-6ubuntu1~16.04.10).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libstdc++-4.8-doc : Conflicts: libstdc++6-4.7-doc but 4.7.4-3ubuntu12 is to be installed
 libstdc++-4.9-doc : Conflicts: libstdc++-4.8-doc but 4.8.5-4ubuntu2 is to be installed
                     Conflicts: libstdc++6-4.7-doc but 4.7.4-3ubuntu12 is to be installed
 libstdc++-5-doc : Conflicts: libstdc++-4.8-doc but 4.8.5-4ubuntu2 is to be installed
                   Conflicts: libstdc++-4.9-doc but 4.9.3-13ubuntu2 is to be installed
                   Conflicts: libstdc++6-4.7-doc but 4.7.4-3ubuntu12 is to be installed
 libstdc++6-4.8-dbg : Conflicts: libstdc++6-4.7-dbg but 4.7.4-3ubuntu12 is to be installed
 libstdc++6-4.8-dbg-armhf-cross : Conflicts: libstdc++6-4.7-dbg-armhf-cross but 4.7.4-3ubuntu12cross3 is to be installed
 libstdc++6-4.9-dbg : Conflicts: libstdc++6-4.7-dbg but 4.7.4-3ubuntu12 is to be installed
                      Conflicts: libstdc++6-4.8-dbg but 4.8.5-4ubuntu2 is to be installed
 libstdc++6-4.9-dbg-arm64-cross : Conflicts: libstdc++6-4.8-dbg-arm64-cross but 4.8.5-4ubuntu1cross2 is to be installed
 libstdc++6-4.9-dbg-armel-cross : Conflicts: libstdc++6-4.7-dbg-armel-cross but 4.7.4-3ubuntu12cross3 is to be installed
 libstdc++6-4.9-dbg-armhf-cross : Conflicts: libstdc++6-4.7-dbg-armhf-cross but 4.7.4-3ubuntu12cross3 is to be installed
                                  Conflicts: libstdc++6-4.8-dbg-armhf-cross but 4.8.5-4ubuntu1cross2 is to be installed
 libstdc++6-4.9-dbg-powerpc-cross : Conflicts: libstdc++6-4.8-dbg-powerpc-cross but 4.8.5-4ubuntu2cross3 is to be installed
 libstdc++6-4.9-dbg-ppc64el-cross : Conflicts: libstdc++6-4.8-dbg-ppc64el-cross but 4.8.5-4ubuntu1cross2 is to be installed
 libstdc++6-5-dbg : Conflicts: libstdc++6-4.7-dbg but 4.7.4-3ubuntu12 is to be installed
                    Conflicts: libstdc++6-4.8-dbg but 4.8.5-4ubuntu2 is to be installed
                    Conflicts: libstdc++6-4.9-dbg but 4.9.3-13ubuntu2 is to be installed
 libstdc++6-5-dbg-arm64-cross : Conflicts: libstdc++6-4.8-dbg-arm64-cross but 4.8.5-4ubuntu1cross2 is to be installed
                                Conflicts: libstdc++6-4.9-dbg-arm64-cross but 4.9.3-13ubuntu2cross1 is to be installed
 libstdc++6-5-dbg-armel-cross : Conflicts: libstdc++6-4.7-dbg-armel-cross but 4.7.4-3ubuntu12cross3 is to be installed
                                Conflicts: libstdc++6-4.9-dbg-armel-cross but 4.9.3-13ubuntu2cross1 is to be installed
 libstdc++6-5-dbg-armhf-cross : Conflicts: libstdc++6-4.7-dbg-armhf-cross but 4.7.4-3ubuntu12cross3 is to be installed
                                Conflicts: libstdc++6-4.8-dbg-armhf-cross but 4.8.5-4ubuntu1cross2 is to be installed
                                Conflicts: libstdc++6-4.9-dbg-armhf-cross but 4.9.3-13ubuntu2cross1 is to be installed
 libstdc++6-5-dbg-powerpc-cross : Conflicts: libstdc++6-4.8-dbg-powerpc-cross but 4.8.5-4ubuntu2cross3 is to be installed
                                  Conflicts: libstdc++6-4.9-dbg-powerpc-cross but 4.9.3-13ubuntu2cross1 is to be installed
 libstdc++6-5-dbg-ppc64el-cross : Conflicts: libstdc++6-4.8-dbg-ppc64el-cross but 4.8.5-4ubuntu1cross2 is to be installed
                                  Conflicts: libstdc++6-4.9-dbg-ppc64el-cross but 4.9.3-13ubuntu2cross1 is to be installed
 libstdc++6-5-dbg-s390x-cross : Conflicts: libstdc++6-4.9-dbg-s390x-cross but 4.9.3-13ubuntu2cross1 is to be installed
E: Unable to correct problems, you have held broken packages.

注意:由于字符限制,我不得不删除部分 APT 输出

【问题讨论】:

  • 您的系统中有文件 libstdc++.so 吗?如果有,在哪里? locate libstdc++.so可以帮你解答这个问题

标签: lua libstdc++ luarocks


【解决方案1】:

我终于“修复”它了

现在一切正常


我知道不应该这样做,这不是正确的做法,但它现在可以工作

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2018-09-03
    • 1970-01-01
    • 1970-01-01
    • 2018-06-06
    • 2016-10-24
    • 2017-11-03
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多