﻿# Installing and updating PVS\-Studio on Linux

PVS\-Studio is distributed as Deb/Rpm packages or an archive\. Using the installation from the repository, you will be able to receive updates about the release of a new version of the program\.

The distribution kit includes the following files:

* pvs\-studio \- the kernel of the analyzer;
* pvs\-studio\-analyzer \- a utility for checking projects without integration;
* [plog\-converter](https://pvs-studio.com/en/docs/manual/0038/#plog-converter) \- a utility for converting the analyzer report to different formats;

You can install the analyzer using the following methods: 

## Install from repositories

### For debian\-based systems:

Until 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-studio
```

After Debian 11 and Ubuntu 22\.04:

```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-studio
```

### 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-studio
```

### 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-studio
```

## Manual installation

You can download PVS\-Studio for Linux [here](https://pvs-studio.com/en/pvs-studio/download/)\.

You also need to install the _strace_ utility 4\.11 or later for [compilation tracing](https://pvs-studio.com/en/docs/manual/0036/#trace) mode to work\.

### Deb package

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

or

```cpp
sudo dpkg -i pvs-studio-VERSION.deb
sudo apt-get -f install
```

### Rpm package

```cpp
$ sudo dnf install pvs-studio-VERSION.rpm
```

or

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

or

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

or

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

### Archive

```cpp
tar -xzf pvs-studio-VERSION.tgz
sudo ./install.sh
```

## Running the analyzer

After a successful analyzer installation on your computer, to check a project follow the instructions on this page: "[How to run PVS\-Studio on Linux](https://pvs-studio.com/en/docs/manual/0036/)"\.