In Ubuntu 16.04, I could:
$ sudo apt install clang
$ scan-build --help
USAGE: scan-build [options] <build command> [build options]
...
But in Ubuntu 18.04, after installing clang
, the scan-build
executable is not installed.
How can I use apt
to install the Clang static analyzer on Ubuntu 18.04?
Based on a search at packages.ubuntu.com, it appears that
scan-build
has been split into a separate clang-tools package.More precisely,
clang
is a dependency package that, on 18.04, installsclang-6.0
, whileclang-tools
depends on the correspondingclang-tools-6.0
- which is the actual package that providesscan-tools
for the current version ofclang
.