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

问题描述 投票:0回答:1

环境:

  • 操作系统 Ubuntu,20.04。

从源代码安装 Erlang

./configure && make && make install

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

为了安装它,我必须执行(并且我做到了)这些步骤:

1. sudo apt-get 更新

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

2. sudo apt-get 升级

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

3. sudo apt-get install build-essential

Reading package lists... Done
Building dependency tree       
Reading state information... Done
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:
 build-essential : Depends: libc6-dev but it is not going to be installed or
                            libc-dev
                   Depends: g++ (>= 4:9.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
ubuntu erlang usb
1个回答
0
投票
  1. 解决:在 $PATH 中找不到可接受的 C 编译器
    sudo apt install gcc
  2. 降级您的libc6
    sudo apt install libc6=2.31-0ubuntu9.7
  3. 现在,您已准备好执行:
    sudo apt install build-essential
  4. 如果一切正常,执行:
    ./configure && make && make install
© www.soinside.com 2019 - 2024. All rights reserved.