我正在通过按照GitHub中的说明来构建Onos:

问题描述 投票:0回答:0

我无法安装Bazel 6.0.0-pre.20220421.3,因为没有这样的包装: 0-pre.20220421.3 Reading package lists... Done Building dependency tree... Done Reading state information... Done E: Unable to locate package bazel-6.0.0-pre.20220421.3 E: Couldn't find any package by glob 'bazel-6.0.0-pre.20220421.3'

我安装了6.0.0,没有抱怨版本冲突,但有一个新的错误:

bazel-6.0.0 build onos
Starting local Bazel server and connecting to it...
ERROR: Traceback (most recent call last):
        File "/home/xt1643/CLionProjects/onos/WORKSPACE", line 1, column 10, in <toplevel>
                workspace(
Error in workspace: workspace() got unexpected keyword argument 'managed_directories'
ERROR: Error computing the main repository mapping: Encountered error while reading extension file 'tools/build_defs/repo/http.bzl': no such package '@bazel_tools//tools/build_defs/repo': error loading package 'external': Could not load //external package

我想知道是否有人知道如何成功与巴泽尔建立Onos?或任何报告错误的地方,我发现GitHub中没有任何问题部分,并且Google组被弃用。 我的系统信息:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.5 LTS
Release:        22.04
Codename:       jammy

updated

:似乎需要使用Bazelisk下载Onos所需的版本,而不是按照官方说明。 Chatgpt提供的命令:

wget https://github.com/bazelbuild/bazelisk/releases/download/v1.18.0/bazelisk-linux-amd64 chmod +x bazelisk-linux-amd64 sudo mv bazelisk-linux-amd64 /usr/local/bin/bazel cd path/to/onos bazel build onos

成功建造:

INFO: Elapsed time: 328.977s, Critical Path: 214.74s INFO: 2530 processes: 211 internal, 2015 linux-sandbox, 2 local, 302 worker. INFO: Build completed successfully, 2530 total actions 雷德,

溶解,请使用Bazelisk安装Bazel。请参阅问题中的更新以获取命令行。
    

build bazel onos
最新问题
© www.soinside.com 2019 - 2025. All rights reserved.