clang-3.8: command not found in WSL (Windows Subsystem for Linux)

Viewed 2336

I am using WSL (Windows Subsystem for Linux), the version is Ubuntu 20.04 LTS.

BUILD_TOOL = \
    build_tool.o 

CC = clang-3.8

LIBS =  ../out/x64/libmbedcrypto.a

all: build_tool


build_tool: $(BUILD_TOOL)
        $(CC) $(BUILD_TOOL) $(LIBS) -o build_tool

Show error: clang-3.8: command not found

I have tried install it via apt-get but no installation candidate.

$ sudo apt-get install clang-3.8`
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package clang-3.8 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'clang-3.8' has no installation candidate
1 Answers

Workable in Ubuntu 20.04 LTS.

sudo apt update
sudo apt install clang

And rewrite Makefile as:

CC = clang
Related