如何在OpenSuse上安装Bazel4.2

发布于 2025-01-20 21:53:57 字数 1210 浏览 1 评论 0原文

OpenSuse似乎提供Bazel4.2软件包,不幸的是,这是一个实验/社区软件包,我不知道如何在基于OpenSuse的Dockerfile中启用此提要。

Dockerfile:

FROM opensuse/tumbleweed
RUN zypper update -y \
&& zypper install -y bazel4.2

RUN bazel --version

从一个社区/实验存储库中检索

docker build --tag=plop .
...
Retrieving repository 'openSUSE-Tumbleweed-Non-Oss' metadata [..done]
Building repository 'openSUSE-Tumbleweed-Non-Oss' cache [....done]
Retrieving repository 'openSUSE-Tumbleweed-Oss' metadata [......done]
Building repository 'openSUSE-Tumbleweed-Oss' cache [....done]
Retrieving repository 'openSUSE-Tumbleweed-Update' metadata [.done]
Building repository 'openSUSE-Tumbleweed-Update' cache [....done]
Loading repository data...
Reading installed packages...
Nothing to do.
Loading repository data...
Reading installed packages...
No provider of 'bazel4.2' found.
'bazel4.2' not found in package names. Trying capabilities.

预期的

并安装了

Bazel4.2。参考: https://software.opensuse.org/package/package/bazel/bazel4.2

It seems OpenSuse provide bazel4.2 package, unfortunately it is an experimental/community package and I don't know how to enable this feed in my opensuse based Dockerfile.

Dockerfile:

FROM opensuse/tumbleweed
RUN zypper update -y \
&& zypper install -y bazel4.2

RUN bazel --version

Observed

docker build --tag=plop .
...
Retrieving repository 'openSUSE-Tumbleweed-Non-Oss' metadata [..done]
Building repository 'openSUSE-Tumbleweed-Non-Oss' cache [....done]
Retrieving repository 'openSUSE-Tumbleweed-Oss' metadata [......done]
Building repository 'openSUSE-Tumbleweed-Oss' cache [....done]
Retrieving repository 'openSUSE-Tumbleweed-Update' metadata [.done]
Building repository 'openSUSE-Tumbleweed-Update' cache [....done]
Loading repository data...
Reading installed packages...
Nothing to do.
Loading repository data...
Reading installed packages...
No provider of 'bazel4.2' found.
'bazel4.2' not found in package names. Trying capabilities.

Expected

Bazel4.2 is retrieved and installed from one community/experimental repository.

ref: https://software.opensuse.org/package/bazel4.2

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

哆啦不做梦 2025-01-27 21:53:57

经过很少的反复试验,

Dockerfile:

FROM opensuse/tumbleweed
RUN zypper update -y
# https://en.opensuse.org/SDB:Add_package_repositories
RUN zypper ar -Gf https://download.opensuse.org/repositories/devel:tools:building/openSUSE_Factory/devel:tools:building.repo
# https://software.opensuse.org/package/bazel4.2
RUN zypper install -y bazel4.2

RUN bazel --version

after few trial and error

Dockerfile:

FROM opensuse/tumbleweed
RUN zypper update -y
# https://en.opensuse.org/SDB:Add_package_repositories
RUN zypper ar -Gf https://download.opensuse.org/repositories/devel:tools:building/openSUSE_Factory/devel:tools:building.repo
# https://software.opensuse.org/package/bazel4.2
RUN zypper install -y bazel4.2

RUN bazel --version
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文