# How to use Linux compile the 3DSLicer source code

**URL:** <https://discourse.slicer.org/t/how-to-use-linux-compile-the-3dslicer-source-code/24028>\
**Category:** Development\
**Tags:** build\
**Created:** [June 24, 2022, 2:08pm UTC](https://discourse.slicer.org/t/how-to-use-linux-compile-the-3dslicer-source-code/24028 "2022-06-24T14:08:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![wangyuyuyujun](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/wangyuyuyujun/32/15773_2.png) [@wangyuyuyujun](https://discourse.slicer.org/u/wangyuyuyujun)\
**Post date:** [June 24, 2022, 2:08pm UTC](https://discourse.slicer.org/t/how-to-use-linux-compile-the-3dslicer-source-code/24028/1 "2022-06-24T14:08:19Z")

</div>

Hello,everyone!I have encountered some installation problems. I hope you can help me.  
I want to install 3DSlicer(version:5.0.2).At present, I have successfully installed Qt5 (version:5.12.1or5.13.0) and other dependencies. When I execute cmake/ After slicer-5.0.2/, the system reported the following error:

 ![YFA6AQ8L8LDN6H6(%1~$P](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/1/e/1ea0cd8306bf25669cf16f45bbc6b8d140b33fed.png)

Then I configured the environment variables:  
export Qt5\_DIR=/usr/local/3Dslicer/qt5  
export PATH=/usr/local/3Dslicer/qt5/bin:$PATH  
export MANPATH=$Qt5\_DIR/man:$MANPATH  
export LD\_LIBRARY\_PATH=$Qt5\_DIR/lib:$LD\_LIBRARY\_PATH

Tried again,

 ![EMZXT3RKMHZX1HPV~BH7_VS](https://us1.discourse-cdn.com/flex002/uploads/slicer/original/3X/1/b/1b01f1d21b8b24acf25f0ac5ce4ec52db99a0109.png)  
There are still two components not found,  
I don’t know what’s wrong. I’m looking forward to your reply.

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 24, 2022, 4:45pm UTC](https://discourse.slicer.org/t/how-to-use-linux-compile-the-3dslicer-source-code/24028/2 "2022-06-24T16:45:01Z")

</div>

You need to install (or build) Qt with webengine component enabled.

---

<div class="post-metadata">

**Author:** ![wangyuyuyujun](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/wangyuyuyujun/32/15773_2.png) [@wangyuyuyujun](https://discourse.slicer.org/u/wangyuyuyujun)\
**Post date:** [June 26, 2022, 12:15pm UTC](https://discourse.slicer.org/t/how-to-use-linux-compile-the-3dslicer-source-code/24028/3 "2022-06-26T12:15:44Z")

</div>

Thank you for your reply. I installed all modules by default when installing Qt5, but webengine was not compiled, so the installation failed. I don’t know what went wrong

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [June 26, 2022, 8:17pm UTC](https://discourse.slicer.org/t/how-to-use-linux-compile-the-3dslicer-source-code/24028/4 "2022-06-26T20:17:42Z")

</div>

Webengine component might not be enabled by default. You can run the Qt install tool again and install that component. Also make sure you specify this installed Qt for Slicer (maybe CMake has found some system Qt that did not have Webengine).
