How to fix conan ERROR: The default build profile doesn't exist.

Problem:

You want to install or build a conan project using a command such as

conan install .

but you see an error message such as

ERROR: The default build profile '/home/uli/.conan2/profiles/default' doesn't exist.
You need to create a default profile (type 'conan profile detect' command)
or specify your own profile with '--profile:build=<myprofile>'

Solution

Typically you just want to create the default build profile using

conan profile detect

detect means to detect the compiler.