# How to fix Meson build “ERROR: Unknown Type feature” on Ubuntu 18.04
###### tags: `meson`
https://suryanshpradhan.wordpress.com/2020/01/04/how-to-fix-meson-build-error-unknown-type-feature-on-ubuntu-18-04/
#### If you’ve installed the Meson build system from Ubuntu’s software repository, you might get an error like this one:

### Meson build error
#### This error is caused by the repository’s Meson package version being outdated as we can see in the picture.

### Meson old version
Meson versions older than 47.0 cannot use the new feature type specified in meson_options.txt definition file. (Source: https://github.com/swaywm/wlroots/issues/1258)
**We can fix this by removing the old version of Meson and installing the latest one. First, open a terminal window (Ctrl + Alt + T) and remove the old version by using the command:**
```javascript=
# sudo apt-get purge meson
```
Remove old Meson
#### There are multiple ways to install Meson. First, you can just use Python’s pip package manager to install Meson. Open a terminal. First make sure you have python3 and python3-pip installed. Run the command:
```javascript=
# sudo apt-get install python3 python3-pip
```
Once it finishes installing, installing Meson using pip with the command:
```javascript=
# sudo pip3 install meson
```
You’ll see something like this:

#### We can see that my new Meson version is much newer than the one that was installed previously. Another way is to directly get the latest release tarball (.tar.gz file) from Meson’s GitHub at https://github.com/mesonbuild/meson/releases

Once you download the file, open a terminal and navigate to the folder where the file is downloaded. Extract it with the command
```javascript=
# tar -xvzf meson-[insert version number here].tar.gz
```
Then navigate into the Meson directory created and use the command
```javascript=
# sudo python3 setup.py install
```
#### to install it. Since you’re going to need Python either way to install it, I recommend using pip as it takes less work.

