安装 lua-requests 时出错

Error installing lua-requests

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

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++ returns 这个:

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 输出

我终于 "fixed" 通过将它安装在另一台机器上而没有错误,并将所有需要的文件复制到那台机器上

现在一切正常


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