【发布时间】:2019-08-01 06:53:30
【问题描述】:
我有一些关于柯南的安装问题
在我的 Ubuntu 18.04 告诉“找不到命令‘柯南’”之后,我猜到了 Python 版本错误。所以我尝试用结果升级
$ sudo apt-get install python
python is already the newest version (2.7.15~rc1-1)
然而
$ locate python
/var/lib/binfmts/python2.7
/var/lib/binfmts/python3.6
在这种状态下我尝试安装柯南
$ pip install conan
Collecting conan
...
Successfully installed Jinja2-2.10.1 MarkupSafe-1.1.1 PyJWT-1.7.1 PyYAML-5.1.2 astroid-1.6.6 attrs-19.1.0 backports.functools-lru-cache-1.5 bottle-0.12.17 certifi-2019.6.16 chardet-3.0.4 colorama-0.4.1 conan-1.18.0 configparser-3.7.4 deprecation-2.0.6 distro-1.1.0 enum34-1.1.6 fasteners-0.15 future-0.16.0 futures-3.3.0 idna-2.8 isort-4.3.21 lazy-object-proxy-1.4.1 mccabe-0.6.1 monotonic-1.5 node-semver-0.6.1 packaging-19.1 patch-1.16 pluginbase-0.7 pygments-2.4.2 pylint-1.9.5 pyparsing-2.4.2 python-dateutil-2.8.0 requests-2.22.0 singledispatch-3.4.0.3 six-1.12.0 tqdm-4.32.2 urllib3-1.25.3 wrapt-1.11.2
然后“柯南”被列为正在安装,但是
$ conan
Command 'conan' not found, did you mean:
即没有错误消息或警告,只是不安装。 我发现我的 PATH 中没有列出该路径,所以我添加了“~.local/bin”。现在故事继续,出现错误消息
CMake Error at CMakeLists.txt:90 (include):
include could not find load file:
Conan
我发现 https://docs.conan.io/en/latest/howtos/cmake_launch.html。 好的,我在我的 CMakeLists.txt 文件行中插入了
# Download automatically, you can also just copy the conan.cmake file
if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
file(DOWNLOAD "https://raw.githubusercontent.com/conan-io/cmake-conan/master/conan.cmake"
"${CMAKE_BINARY_DIR}/conan.cmake")
endif()
include(${CMAKE_BINARY_DIR}/conan.cmake)
conan_cmake_run(REQUIRES Catch2/2.6.0@catchorg/stable
BASIC_SETUP)
我也被告知,
Please specify in command line CMAKE_BUILD_TYPE
(-DCMAKE_BUILD_TYPE=Release)
所以我用
cmake .. -DCMAKE_BUILD_TYPE=Release
而不是
cmake ..
我还是收到了
ERROR: compiler not defined for compiler.libcxx
Please define compiler value first too
FATAL_ERROR;conan install command failed.
STATUS;Conan: Compiler GCC>=5, checking major version 7
STATUS;Conan: Checking correct version: 7
大约两周前,我可以在另一个系统上完美地安装相同的项目。我能以某种方式回到那个状态吗?我希望柯南是稳定的,而不是 alpha。
编辑 2: 我发了
conan profile new default --detect --force
回复是
Found gcc 7
gcc>=5, using the major as version
************************* WARNING: GCC OLD ABI COMPATIBILITY ***********************
Conan detected a GCC version > 5 but has adjusted the 'compiler.libcxx' setting to
'libstdc++' for backwards compatibility.
Your compiler is likely using the new CXX11 ABI by default (libstdc++11).
(我真的不知道为什么在一个新项目的情况下我需要向后兼容)然后,
cmake ..
似乎终于奏效了。由于编译器标准,恐怕我会遇到更多问题。例如,SystemC 默认为 '98,但其他一些库使用需要 '14 的功能,现在柯南强制使用 '11。有没有办法集中处理所有这些,特定于我的系统?
关于两个python版本:我没有手动安装,只有其他一些安装程序这样做了。我真的不知道为什么以及哪个安装脚本会导致这种翻倍。顺便说一句:Ubuntu 说 V2.7 是最新版本,尽管 V3.x 也存在。我对这些版本号有点困惑。 我只是做了一个新的安装,并没有特别在python的第二个版本出现的时候。我个人连python都不用,只有一些安装脚本可以安装。
我的系统是否是特定的:我不这么认为。我刚刚安装了 Ubuntu 18.04.2,我的主要目标是安装这个 SystemC 相关的东西。我真的只安装了被声明为丢失的东西。 (加上livetex、git等)
与此同时,'cmake ..' 终止了。显然,柯南的安装终止了。但是,在配置我的项目时,会给出类似
的消息CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
SCV_INCLUDE_DIRS
丢失的文件也是由柯南安装的,使用
[requires]
SystemC/2.3.3@minres/stable
SystemCVerification/2.0.1@minres/stable
doxygen_installer/1.8.15@bincrafters/stable
qt/5.12.0@bincrafters/stable
gtest/1.8.1@bincrafters/stable
flex/2.6.4@bincrafters/stable
我使用的是完全相同的文件(我的旧磁盘连接到总线或新磁盘,使用相同的电缆)。大约一个月前进行的安装运行良好,新的安装与描述的一样。
看来安装和使用柯南对我来说太复杂了。我想简化安装而不是让它复杂化。
【问题讨论】:
标签: python installation conan