File: install-redhat.md

package info (click to toggle)
bazel-bootstrap 4.2.3%2Bds-11
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 85,704 kB
  • sloc: java: 721,717; sh: 55,859; cpp: 35,360; python: 12,139; xml: 295; objc: 269; makefile: 113; ansic: 106; ruby: 3
file content (48 lines) | stat: -rwxr-xr-x 1,399 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
layout: documentation
title: Installing Bazel on Fedora and CentOS
---

# Installing Bazel on Fedora and CentOS

The Bazel team does not provide official packages for Fedora and CentOS.
Vincent Batts ([@vbatts](https://github.com/vbatts)) generously maintains
unofficial packages on
[Fedora COPR](https://copr.fedorainfracloud.org/coprs/vbatts/bazel/).

The commands below must be run either via `sudo` or while logged in as `root`.

Add `--allowerasing` when installing an upgrade from a previous major
version of the Bazel package.

[The Bazelisk installer](install-bazelisk.md) is an alternative to package installation.

## Installing on Fedora 25+

1. The [DNF](https://fedoraproject.org/wiki/DNF) package manager can install
    Bazel from the [COPR](https://copr.fedorainfracloud.org/) repository. Install
    the `copr` plugin for DNF if you have not already done so.

    ```bash
    dnf install dnf-plugins-core
    ```

2. Run the following commands to add the Bazel repository and install the
    package:

    ```bash
    dnf copr enable vbatts/bazel
    dnf install bazel3
    ```

## Installing on CentOS 7

1. Download the corresponding `.repo` file from
    [Fedora COPR](https://copr.fedorainfracloud.org/coprs/vbatts/bazel/repo/epel-7/vbatts-bazel-epel-7.repo)
    and copy it to `/etc/yum.repos.d/`.

2. Run the following command:

    ```bash
    yum install bazel3
    ```