13

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?

phoenix
  • 239
  • 1
  • 2
  • 7
  • 3
    Possible duplicate of [How do I find the package that provides a file?](https://askubuntu.com/questions/481/how-do-i-find-the-package-that-provides-a-file) – David Foerster May 09 '18 at 02:34

1 Answers1

18

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, installs clang-6.0, while clang-tools depends on the corresponding clang-tools-6.0 - which is the actual package that provides scan-tools for the current version of clang.

steeldriver
  • 131,985
  • 21
  • 239
  • 326