【问题标题】:Google Cloud Build and GLIBCXX_3.4.21 not found(for TexturePacker)未找到 Google Cloud Build 和 GLIBCXX_3.4.21(对于 TexturePacker)
【发布时间】:2019-11-18 21:05:57
【问题描述】:

我正在尝试使用 Google Cloud Build 构建需要 TexturePacker 的项目。

我设法安装了 TexturePacker,但是一旦脚本执行了它的 CLI,我就会收到这个错误:

/usr/bin/../lib/texturepacker/TexturePacker_: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /usr/bin/../lib/texturepacker/TexturePacker_)

尝试安装必要的库但仍然没有成功(如下所示):

FROM gcr.io/cloud-builders/yarn
RUN apt-get update && apt-get install -y libgl1-mesa-glx
RUN apt-get install -y libstdc++6
RUN wget https://www.codeandweb.com/download/texturepacker/5.2.0/TexturePacker-5.2.0-ubuntu64.deb && dpkg -i TexturePacker-5.2.0-ubuntu64.deb

有人知道如何解决它吗?

【问题讨论】:

  • 我是 Cloud Build 的新手,但我认为如果您正在构建自定义步骤,查看完整的 cloudbuild.yaml 和 Dockerfile 可能会很有用。
  • 我用完整的 Dockerfile 编辑了我的帖子。它基于纱线生成器,因为我运行正常的 node.js 脚本,其中使用 TexturePacker cli
  • @abradas 根据TexturePacker documentation 有一个关于Command line client (TexturePacker) not found 的已知错误。他们建议手动放置可执行文件的链接的额外步骤。你在本地试过吗?
  • 是的,它可以在本地工作,但不能在 Google Build 中工作。但是,我猜这里的问题有点不同。 TexturePacker 命令有效,但是一旦我尝试构建 sprisheets,它就会崩溃,因为它需要 GLIBCXX_3.4.21
  • 据我了解,问题出在 Cloud Build 中,无法识别“GLIBCXX_3.4.21”库。您在使用带有 Docker 的 Cloud Build 吗?如果没有,我建议您使用 Docker 来使用“GLIBCXX_3.4.21”库。 Here你可以查看如何使用 Cloud Build 和 Docker。

标签: google-cloud-build texturepacker


【解决方案1】:

我设法使用这个 Dockerfile 解决了这个问题:

FROM node:latest
RUN apt-get update

# Install updates and dependencies
RUN apt-get install --no-install-recommends -y -q curl python build-essential git ca-certificates libkrb5-dev imagemagick && \
    apt-get clean && rm /var/lib/apt/lists/*_*

#TexturePacker and dependencies
RUN apt-get install -y libgl1-mesa-glx
RUN apt-get install -y libstdc++6
RUN wget https://www.codeandweb.com/download/texturepacker/5.2.0/TexturePacker-5.2.0-ubuntu64.deb && dpkg -i TexturePacker-5.2.0-ubuntu64.deb

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-11-01
    • 1970-01-01
    • 2021-03-27
    • 2022-11-11
    • 2020-11-19
    • 2021-08-16
    • 1970-01-01
    • 2021-10-08
    相关资源
    最近更新 更多