# Slicer3d compilation on Ubuntu 20.04 lts

**URL:** https://discourse.slicer.org/t/slicer3d-compilation-on-ubuntu-20-04-lts/19335
**Category:** Support
**Created:** [August 24, 2021, 10:28am UTC](https://discourse.slicer.org/t/slicer3d-compilation-on-ubuntu-20-04-lts/19335 "2021-08-24T10:28:45Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Chintha\_Siva\_Prasad](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/chintha_siva_prasad/32/7766_2.png) [@Chintha\_Siva\_Prasad](https://discourse.slicer.org/u/Chintha_Siva_Prasad)
#### Post date: [August 24, 2021, 10:28am UTC](https://discourse.slicer.org/t/slicer3d-compilation-on-ubuntu-20-04-lts/19335/1 "2021-08-24T10:28:45Z")

</div>

I am trying to build slicer by compiling the source code. When I am building it through cmake command it’s saying that it requires atleast 5.15.1.

 ![IMG-20210824-WA0035](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/3/a/3ab2389947c71764df9232792c4c7a0280512d05.jpeg)  
But when I am using qt-default , it’s not installing the required version. And when tried to install latest version(6.x) through qt-online installer,it’s installing in a custom directory and while building slicer it’s using the older version.How can I resolve this issue? Is there a way to specify qt directory when I am compiling slicer? Or there is a optimal way to resolve this issue?

---

<div class="post-metadata">

### Author: ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)
#### Post date: [August 24, 2021, 11:47am UTC](https://discourse.slicer.org/t/slicer3d-compilation-on-ubuntu-20-04-lts/19335/2 "2021-08-24T11:47:58Z")

</div>

You can work around this by setting Slicer\_REQUIRED\_QT\_VERSION CMake variable to 5.12.8. You can follow further discussion here:

> <https://github.com/Slicer/Slicer/issues/5804>
>
> When following linux build instructions on Ubuntu 20.04, the \[prerequisites that… are installed by the provided command\](https://slicer.readthedocs.io/en/latest/developer\_guide/build\_instructions/linux.html#ubuntu-20-04-focal-fossa) are not sufficient to build Slicer: I got a CMake error message that minimum Qt-5.12.1 is required.
> 
> Either the build instructions have to be updated so that it gets the required Qt version, or the Qt version check has to be relaxed.
