无法在Ubuntu 20.04上从源代码安装Erlang/OTP 26

zu0ti5jz  于 2023-10-14  发布在  Erlang
关注(0)|答案(1)|浏览(549)

工作环境:

  • 操作系统Ubuntu,20.04。

从源代码./configure && make && make install安装Erlang

  1. ./configure --disable-option-checking --cache-file=/dev/null --srcdir="/home/user/Documents/_installed/otp_src_26.1/erts"
  2. checking build system type... x86_64-pc-linux-gnu
  3. checking host system type... x86_64-pc-linux-gnu
  4. checking target system type... x86_64-pc-linux-gnu
  5. checking for gcc... no
  6. checking for cc... no
  7. checking for cl.exe... no
  8. checking for clang... no
  9. configure: error: in `/home/user/Documents/_installed/otp_src_26.1/erts':
  10. configure: error: no acceptable C compiler found in $PATH
  11. See `config.log' for more details
  12. ERROR: /home/user/Documents/_installed/otp_src_26.1/erts/configure failed!
  13. Killed

为了安装它,我必须做(我做了)这些步骤:

1. sudo apt-get更新

  1. Hit:1 http://ua.archive.ubuntu.com/ubuntu focal InRelease
  2. Hit:2 http://security.ubuntu.com/ubuntu focal-security InRelease
  3. Reading package lists... Done

2. sudo apt-get升级

  1. Reading package lists... Done
  2. Building dependency tree
  3. Reading state information... Done
  4. Calculating upgrade... Done
  5. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

3. sudo apt-get install build-essential

  1. Reading package lists... Done
  2. Building dependency tree
  3. Reading state information... Done
  4. Some packages could not be installed. This may mean that you have
  5. requested an impossible situation or if you are using the unstable
  6. distribution that some required packages have not yet been created
  7. or been moved out of Incoming.
  8. The following information may help to resolve the situation:
  9. The following packages have unmet dependencies:
  10. build-essential : Depends: libc6-dev but it is not going to be installed or
  11. libc-dev
  12. Depends: g++ (>= 4:9.2) but it is not going to be installed
  13. E: Unable to correct problems, you have held broken packages.
2exbekwf

2exbekwf1#

[已解决]
1.要解决 * 在$PATH* 中找不到可接受的C编译器:sudo apt install gcc
1.降级您的 * libc 6 *:sudo apt install libc6=2.31-0ubuntu9.7
1.现在,你已经准备好执行:sudo apt install build-essential
1.如果一切正常,执行:./configure && make && make install

相关问题