{"id":252,"date":"2022-01-07T18:04:47","date_gmt":"2022-01-07T21:04:47","guid":{"rendered":"https:\/\/gladiston.net.br\/?page_id=252"},"modified":"2024-06-06T11:13:40","modified_gmt":"2024-06-06T14:13:40","slug":"instalacao-no-linux-instalacao-a-partir-dos-repositorios-nivel-facil","status":"publish","type":"page","link":"https:\/\/gladiston.net.br\/en\/programacao\/lazarus-ide\/instalacao-no-linux-instalacao-a-partir-dos-repositorios-nivel-facil\/","title":{"rendered":"Installation on Linux: Install FPC from the repositories"},"content":{"rendered":"<p>Installing from the repositories is only recommended for FreePascal (FPC from now on), because Lazarus needs a homeuser install, otherwise you would have to change permissions on folders on systems where it is not safe to move.<\/p>\n\n\n\n<p>In this installation, we will use FPC from the repositories, but Lazarus will be installed by fpcupdeluge. First let&#039;s install some essential packages:<\/p>\n\n\n\n<pre class=\"wp-block-code alignwide\"><code><strong>(se seu sistema for Redhat-like como o Fedora)<\/strong>\nsudo dnf install make automake gcc gcc-c++ kernel-devel\nsudo dnf groupinstall \"Development Tools\" \"Development Libraries\"\nsudo dnf install gdb zip unzip subversion binutils libX11-devel gtk2-devel gdk-pixbuf2-xlib\nsudo dnf install cairo cairo-devel cairomm-devel\nsudo dnf install pango pango-devel pangomm pangomm-devel\n\n<strong>(se seu sistema for Debian-like como o Ubuntu)<\/strong>\nsudo apt install -y build-essential \nsudo apt install -y wget curl lzip tar unzip squashfs-tools\nsudo apt install -y gdb zip unzip subversion binutils libx11-dev libgtk2.0-dev libgdk-pixbuf2.0-dev\nsudo apt install -y libcairo2 libcairo2-dev libcairomm-1.0-dev libpangomm-1.4-dev<\/code><\/pre>\n\n\n\n<p>The FPC source code will also be required, so run:<\/p>\n\n\n\n<pre class=\"wp-block-code alignwide\"><code><strong>(se seu sistema for Redhat-like como o Fedora)<\/strong>\nsudo dnf install fpc fpc-src qt5pas-devel\n<strong>(se seu sistema for Debian-like como o Ubuntu)<\/strong>\nsudo apt-get install -y fpc fpc-source  libqt5pas-dev\n<\/code><\/pre>\n\n\n\n<p>On both Windows and Linux it is essential to know where the freepascal source files are located, so run:<\/p>\n\n\n\n<pre class=\"wp-block-code alignwide\"><code><strong>(se seu sistema for Redhat-like como o Fedora)<\/strong>\nrpm -ql fpc-src\n<strong>(se seu sistema for Debian-like como o Ubuntu)<\/strong>\ndpkg -L fpc-source<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code alignwide\"><code>(...)\n<strong>\/usr\/share\/fpcsrc<\/strong>\/rtl\/x86_64\/set.inc\n<strong>\/usr\/share\/fpcsrc<\/strong>\/rtl\/x86_64\/setjump.inc\n<strong>\/usr\/share\/fpcsrc<\/strong>\/rtl\/x86_64\/setjumph.inc\n<strong>\/usr\/share\/fpcsrc<\/strong>\/rtl\/x86_64\/strings.inc\n<strong>\/usr\/share\/fpcsrc<\/strong>\/rtl\/x86_64\/stringss.inc\n<strong>\/usr\/share\/fpcsrc<\/strong>\/rtl\/x86_64\/x86_64.inc (...)<\/code><\/pre>\n\n\n\n<p>If you took a good look at the output of the command, they are all in the root of the folder:<\/p>\n\n\n\n<p><strong>\/usr\/share\/fpcsrc<\/strong><\/p>\n\n\n\n<p>Make a note of this path because it will be important for configuring the Lazarus IDE or vscode. With FPC installed on your system you are able to install Lazarus via GIT or fpcupdeluge. In order not to be too repetitive, choose how you want to install Lazarus:<\/p>\n\n\n\n<p>The. <a href=\"https:\/\/gladiston.net.br\/en\/?page_id=253\" title=\"Using fpcupdeluge (medium level)\">Using fpcupdeluge (medium level)<\/a><\/p>\n\n\n\n<p>B. <a href=\"https:\/\/gladiston.net.br\/en\/?page_id=254\" title=\"Using GIT as installer (medium level+1)\">Using GIT as installer (medium level+1)<\/a><\/p>\n\n\n\n<p>If you decide to use fpcupdeluge, be careful to customize the installation by going to the&nbsp;<strong>Setup+<\/strong>&nbsp;and turning on the option&nbsp;<strong>Use system FPC for Lazarus:<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"452\" height=\"438\" src=\"http:\/\/gladiston.net.br\/wp-content\/uploads\/2022\/01\/instalacao_linux_instalador1.png\" alt=\"\" class=\"wp-image-98\" srcset=\"https:\/\/gladiston.net.br\/wp-content\/uploads\/2022\/01\/instalacao_linux_instalador1.png 452w, https:\/\/gladiston.net.br\/wp-content\/uploads\/2022\/01\/instalacao_linux_instalador1-300x291.png 300w\" sizes=\"auto, (max-width: 452px) 100vw, 452px\" \/><figcaption class=\"wp-element-caption\">Checking the \u201cUse system FPC\u201d option<\/figcaption><\/figure>\n\n\n\n<p>The above option when checked will make fpcupdeluge reuse the pre-installed fpc, otherwise you will face a bunch of fpc downloads and builds which in my modest opinion is not worth it.<\/p>\n\n\n\n<p>If you felt difficulty in the article, watch the video below:<\/p>\n\n\n\n<figure class=\"wp-block-embed is-type-video is-provider-youtube wp-block-embed-youtube wp-embed-aspect-4-3 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\">\n<iframe loading=\"lazy\" title=\"#6: FreePascal Compiler - FreePascal\/Lazarus Development with Linux\" width=\"580\" height=\"435\" src=\"https:\/\/www.youtube.com\/embed\/C_b7xwpQVgE?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe>\n<\/div><\/figure>","protected":false},"excerpt":{"rendered":"<p>A instala\u00e7\u00e3o a partir dos reposit\u00f3rios \u00e9 recomendada apenas ao FreePascal(FPC daqui em diante), porque o Lazarus precisa de uma instala\u00e7\u00e3o homeuser, do contr\u00e1rio voc\u00ea teria de alterar permiss\u00f5es em pastas de sistemas onde n\u00e3o \u00e9 seguro mexer. Nesta instala\u00e7\u00e3o, usaremos o FPC dos reposit\u00f3rios, por\u00e9m o Lazarus ser\u00e1 instalado pelo fpcupdeluge. Primeiro vamos instalar [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":159,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"templates\/template-full-width.php","meta":{"footnotes":""},"class_list":["post-252","page","type-page","status-publish","hentry"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/gladiston.net.br\/en\/wp-json\/wp\/v2\/pages\/252","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gladiston.net.br\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/gladiston.net.br\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/gladiston.net.br\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gladiston.net.br\/en\/wp-json\/wp\/v2\/comments?post=252"}],"version-history":[{"count":7,"href":"https:\/\/gladiston.net.br\/en\/wp-json\/wp\/v2\/pages\/252\/revisions"}],"predecessor-version":[{"id":2524,"href":"https:\/\/gladiston.net.br\/en\/wp-json\/wp\/v2\/pages\/252\/revisions\/2524"}],"up":[{"embeddable":true,"href":"https:\/\/gladiston.net.br\/en\/wp-json\/wp\/v2\/pages\/159"}],"wp:attachment":[{"href":"https:\/\/gladiston.net.br\/en\/wp-json\/wp\/v2\/media?parent=252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}