ubuntu - 引导 CMake 时出错:在 ubuntu 上脱机安装
问题描述
我正在使用 Ubuntu 18.04,我正在尝试通过执行以下命令在没有 Internet 访问权限的情况下安装cmake (cmake-3.21.1.tar.gz) :
export CC=/usr/bin/gcc
export CXX=/usr/bin/g++
./bootstrap
但这会导致以下错误:
---------------------------------------------
CMake 3.21.1, Copyright 2000-2021 Kitware, Inc. and Contributors
---------------------------------------------
Error when bootstrapping CMake:
Cannot find appropriate C compiler on this system.
Please specify one using environment variable CC.
See cmake_bootstrap.log for compilers attempted.
---------------------------------------------
Log of errors: /dbfs/FileStore/tables/arrow_dir/cmake-3.21.1/Bootstrap.cmk/cmake_bootstrap.log
---------------------------------------------
我打开了cmake_bootstrap.log
文件,但该文件的内容如下:
Checking whether '/usr/bin/gcc ' works.
这并不能说明问题出在哪里!
注意:这里已经有类似的问题,但没有一个解决方案适合我。我正在使用无法访问互联网的 ubuntu ,所以我的情况有所不同!
这是我到目前为止所做的:
build-essential
使用重新安装sudo dpkg -i /dbfs/FileStore/tables/build_essential_12_4ubuntu1_amd64.deb
确保 gcc 和 g++ 已安装,执行如下:
which gcc which g++
结果是:
/usr/bin/gcc /usr/bin/g++
然后我在 and 检查了gcc和g ++的版本:
/usr/bin/gcc
/usr/bin/g++
export CC=/usr/bin/gcc export CXX=/usr/bin/g++ $CC --version $CXX --version
这导致:
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. g++ (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
通过运行 make确保make已经可用,并且它是可用的:
GNU Make 4.1 Built for x86_64-pc-linux-gnu Copyright (C) 1988-2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
因此,make、gcc 和 g++ 存在,但我仍然无法执行./bootstrap
,也看不到cmake_bootstrap.log
. 如何在不访问 Internet 的情况下解决此问题?感谢您阅读我的问题并期待提出建议。
我的 ubuntu 详细信息是:
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic
Linux 0325-123141-frank631-10-48-11-75 5.4.0-1051-azure #53~18.04.1-Ubuntu SMP Fri Jun 18 22:32:58 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
amd64
解决方案
推荐阅读
- polymer - 根据纸张标签选择添加/删除铁选择类
- elasticsearch - Elasticsearch:search_as_you_type 数据类型与标记器 edge_ngram
- node.js - MongoDB:了解索引类型和索引属性
- svn - 将 Subversion 中的文件移动到限制较少的文件夹是否会暴露其版本和日志历史记录?
- python - 执行存储为字符串值的模块
- json - Pandas 数据框从 json 中提取值,从请求中作为内容(JSON)返回,
- api - RESTful API 的负载模型是否应该决定 api 的行为方式?
- python - 不断迭代分页字典
- html - 页面加载时触发 CSS 转换
- python - 我在 django 上的模板上遗漏了什么吗