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 - a utility for converting the analyzer report to different formats;
  • plog-converter-source.tgz - the source code of the plog-converter utility.

You can install the analyzer using the following methods:

Install from repositories

For debian-based systems:

wget -q -O - http://files.viva64.com/etc/pubkey.txt | \
  sudo apt-key add -

sudo wget -O /etc/apt/sources.list.d/viva64.list \
  http://files.viva64.com/etc/viva64.list

sudo apt-get update
sudo apt-get install pvs-studio

For yum-based systems:

wget -O /etc/yum.repos.d/viva64.repo \
  http://files.viva64.com/etc/viva64.repo

yum update
yum install pvs-studio

For zypper-based systems:

sudo zypper ar -f http://files.viva64.com/rpm viva64
sudo zypper update
sudo zypper install pvs-studio

Manual installation

Deb package

sudo gdebi pvs-studio-VERSION.deb

or

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

Rpm package

$ sudo dnf install pvs-studio-VERSION.rpm

or

sudo zypper install pvs-studio-VERSION.rpm

or

sudo yum install pvs-studio-VERSION.rpm

Archive

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

Do you make errors in the code?

Check your code
with PVS-Studio

Static code analysis
for C, C++ and C#

goto PVS-Studio;