gpt4 book ai didi

ubuntu - 如何在 Travis 的 Ubuntu 12.04(精确)上安装 libc++?

转载 作者:行者123 更新时间:2023-12-04 18:46:22 28 4
gpt4 key购买 nike

Travis Ubuntu-precise apt whitelist列出了包 libc++-dev ,我尝试通过它安装

# .travis.yml
addons:
apt:
sources:
- ubuntu-toolchain-r-test
- kubuntu-backports
- llvm-toolchain-precise
packages:
- g++-4.8
- cmake
- libc++-dev

Travis 作业的 APT 步骤中发生的情况是
$ sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install g++-4.8 cmake libc++-dev
Reading package lists...
Building dependency tree...
Reading state information...
libc-dev-bin is already the newest version.
libc-dev-bin set to manually installed.
libc6-dev is already the newest version.
libc6-dev set to manually installed.
The following package was automatically installed and is no longer required:
libxmlrpc-core-c3
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
cmake-data cpp-4.8 emacsen-common gcc-4.8 gcc-4.8-base gcc-6-base libasan0
libatomic1 libc6-armel-cross libc6-armhf-cross libcloog-isl4 libgcc-4.8-dev
libgcc1 libgcc1-armel-cross libgcc1-armhf-cross libgomp1 libisl10 libitm1
libpurelibc1 libquadmath0 libstdc++-4.8-dev libstdc++6 libtsan0
Suggested packages:
codeblocks eclipse gcc-4.8-locales dietlibc-doc g++-4.8-multilib gcc-4.8-doc
libstdc++6-4.8-dbg gcc-4.8-multilib libmudflap0-4.8-dev libgcc1-dbg
libgomp1-dbg libitm1-dbg libatomic1-dbg libasan0-dbg libtsan0-dbg
libbacktrace1-dbg libquadmath0-dbg libmudflap0-dbg binutils-gold
libstdc++-4.8-doc
The following NEW packages will be installed:
cpp-4.8 dietlibc-dev g++-4.8 gcc-4.8 gcc-4.8-base gcc-6-base libasan0
libatomic1 libc6-armel-cross libc6-armhf-cross libc6-dev-armel-cross
libc6-dev-armhf-cross libcloog-isl4 libgcc-4.8-dev libgcc1-armel-cross
libgcc1-armhf-cross libisl10 libitm1 libklibc-dev libowfat-dietlibc-dev
libpurelibc-dev libpurelibc1 libstdc++-4.8-dev libtsan0
linux-libc-dev-armel-cross linux-libc-dev-armhf-cross
The following packages will be upgraded:
cmake cmake-data emacsen-common libgcc1 libgomp1 libquadmath0 libstdc++6
linux-libc-dev
8 upgraded, 26 newly installed, 0 to remove and 242 not upgraded.
Need to get 43.6 MB of archives.
After this operation, 77.1 MB of additional disk space will be used.

所以你可以看到在 install 命令行之后不再提到 libc++-dev 了。发生的情况是添加了以下软件包:
  • libc-dev-bin
  • libc6-dev
  • libc6-armel-cross
  • libc6-armhf-cross
  • libgcc1-armel-cross
  • libgcc1-armhf-cross
  • libpurelibc1

  • 所以我想有一些正则表达式的魔力正在发生(libc++-dev 是否​​与 libc6-dev 匹配?)。

    那么,如何在 Travis 上安装 libc++-dev 呢?

    最佳答案

    根本原因是 sources 下列出的存储库不提供 libc++-dev,因此您无法安装该软件包(至少不能从这些存储库中安装)。

    当包不存在时,apt-get 和 apt(不是 aptitude)回退到将名称解释为匹配所有包含该正则表达式的包的正则表达式。如果您不喜欢这样,您可以将包名称表述为正则表达式:^libc\+\+-dev$

    关于ubuntu - 如何在 Travis 的 Ubuntu 12.04(精确)上安装 libc++?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37256764/

    28 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com