工作环境:
- 操作系统Ubuntu,20.04。
从源代码./configure && make && make install
安装Erlang
./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.
1条答案
按热度按时间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
。