﻿# Installing PVS\-Studio Go analyzer \(pvs\-golang\)

Direct links to download the distributions are available on [the download page](https://pvs-studio.com/en/pvs-studio/download-all/)\.

## Windows

To install `pvs-golang`, select **Go analysis engine**\. On the installer page, you can also choose to install the GoLand plugin\.

![install_pvs-golang/image1.png](https://import.viva64.com/docx/blog/install_pvs-golang/image1.png)

## Linux

### Installation from repositories

**For debian\-based systems**

Before Debian 11 and Ubuntu 22\.04:

```cpp
wget -q -O - https://wcdn.pvs-studio.com/etc/pubkey.txt | \
  sudo apt-key add -

sudo wget -O /etc/apt/sources.list.d/viva64.list \
  https://wcdn.pvs-studio.com/etc/viva64.list

sudo apt-get update
sudo apt-get install pvs-golang
```

Debian 11 and Ubuntu 22\.04 and newer:

```cpp
wget -qO- https://wcdn.pvs-studio.com/etc/pubkey.txt | \
  sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/viva64.gpg

sudo wget -O /etc/apt/sources.list.d/viva64.list \
  https://wcdn.pvs-studio.com/etc/viva64.list

sudo apt-get update
sudo apt-get install pvs-golang
```

**For yum\-based systems:**

```cpp
wget -O /etc/yum.repos.d/viva64.repo \ 
  https://wcdn.pvs-studio.com/etc/viva64.repo
yum update
yum install pvs-golang
```

**For zypper\-based systems:**

```cpp
wget -q -O /tmp/viva64.key \
  https://wcdn.pvs-studio.com/etc/pubkey.txt

sudo rpm --import /tmp/viva64.key
sudo zypper ar -f https://wcdn.pvs-studio.com/rpm viva64

sudo sed -i \
  's|enabled=1|enabled=1\ngpgkey=https://wcdn.pvs-studio.com/etc/pubkey.txt|' \
  /etc/zypp/repos.d/viva64.repo

sudo zypper refresh
sudo zypper install pvs-golang
```

### Manual installation

To install, use the following command:

**Deb package**

```cpp
sudo gdebi pvs-golang-VERSION.deb
```

or

```cpp
sudo apt-get -f install pvs-golang-VERSION.deb
```

**Rpm package**

```cpp
sudo dnf install pvs-golang-VERSION.rpm
```

or

```cpp
sudo zypper install pvs-golang-VERSION.rpm
```

or

```cpp
sudo yum install pvs-golang-VERSION.rpm
```

or

```cpp
sudo rpm -i pvs-golang-VERSION.rpm
```

**Archive**



```cpp
tar -xzf pvs-golang-VERSION.tar.gz
sudo ./install.sh
```

## macOS

### Installation from Homebrew

Installation commands:

```cpp
brew install viva64/pvs-studio/pvs-golang
```

Update commands:

```cpp
brew upgrade pvs-studio-golang
```

### Installer

Run the `.pkg` file and follow the instructions\. On the **Installation Type** page, click the **Customize** button and select the components you want to install\.

![install_pvs-golang/image2.png](https://import.viva64.com/docx/blog/install_pvs-golang/image2.png)

#### Archive

To install from the archive, run:

```cpp
unzip pvs-golang-VERSION.zip
sudo ./install.sh
```