Install on Ubuntu from .deb files: what changed
Revision 0 to 1. Removed lines have a minus sign; added lines have a plus sign.
Title: Install on Ubuntu from .deb files
| Old | New | Line | |
|---|---|---|---|
| 1 | + | *(Ubuntu only)* | |
| 2 | + | ||
| 3 | + | **Please See [[Installing Lazarus on Linux]] - a page that covers most of what you need for most Linux Distributions.** | |
| 4 | + | ||
| 5 | + | This page is substantially out of date and may be removed. | |
| 6 | + | ||
| 7 | + | ## In General | |
| 8 | + | ||
| 9 | + | ### Why install from .debs? | |
| 10 | + | ||
| 11 | + | The easiest way to install Lazarus on Ubuntu is via the software Centre or Synaptic. However if that is unsuccessful or the version of Lazarus in the repository is too old and you want a newer version then you can 'install from debs'. | |
| 12 | + | ||
| 13 | + | ### .deb files | |
| 14 | + | ||
| 15 | + | .deb files are the ideal files for installing on Ubuntu. You need to download the Lazarus .deb files you want. They will usually be on SourceForge. There will be a Lazarus .deb and a Free Pascal .deb. They will *match* each other. | |
| 16 | + | ||
| 17 | + | ## In Particular: Lazarus 0.9.30 on Ubuntu 10.04 | |
| 18 | + | ||
| 19 | + | ### Get The files | |
| 20 | + | ||
| 21 | + | <https://sourceforge.net/projects/lazarus/files/> | |
| 22 | + | ||
| 23 | + | #### Repository | |
| 24 | + | ||
| 25 | + | The versions in the Ubuntu repository are | |
| 26 | + | ||
| 27 | + | - Lazarus 0.9.28 | |
| 28 | + | - Free Pascal 2.4.0 | |
| 29 | + | ||
| 30 | + | These are too old. | |
| 31 | + | ||
| 32 | + | #### SourceForge | |
| 33 | + | ||
| 34 | + | The versions on SourceForge are | |
| 35 | + | ||
| 36 | + | - Lazarus 0.9.30 | |
| 37 | + | - Free Pascal 2.4.2 | |
| 38 | + | ||
| 39 | + | These are what I want. | |
| 40 | + | ||
| 41 | + | #### Find SourceForge .deb files | |
| 42 | + | ||
| 43 | + | The names of the .deb files I need to download are | |
| 44 | + | ||
| 45 | + | - lazarus-0.9.30-i386.deb.tar (71.1MB) | |
| 46 | + | - fpc-2.4.2-0.i386.deb.tar (38.5 MB) | |
| 47 | + | ||
| 48 | + | You can search for these directly in a Search engine with something like | |
| 49 | + | ||
| 50 | + | `Lazarus 0.9.30 .deb SourceForge` | |
| 51 | + | ||
| 52 | + | #### Download and Extract | |
| 53 | + | ||
| 54 | + | Download these two files. Double click on them and accept the offer to extract. | |
| 55 | + | ||
| 56 | + | - Extract Free Pascal into folder 'a' | |
| 57 | + | - Extract Lazarus in folder 'b'. | |
| 58 | + | - Move the folders onto the Desktop | |
| 59 | + | ||
| 60 | + | #### Inside the folders | |
| 61 | + | ||
| 62 | + | Once done, there are 21 .deb files in folder a and 12 .deb files in folder b. Two common mistakes when installing Lazarus are | |
| 63 | + | ||
| 64 | + | - not installing Free Pascal first | |
| 65 | + | - not installing Free Pascal source code. | |
| 66 | + | ||
| 67 | + | However, notice that Free Pascal source code is one of the files in folder a. Therefore, this will NOT need to be downloaded and installed separately. | |
| 68 | + | ||
| 69 | + | ### Install Free Pascal | |
| 70 | + | ||
| 71 | + | This should be done first. | |
| 72 | + | ||
| 73 | + | Open a terminal. | |
| 74 | + | ||
| 75 | + | ``` bash | |
| 76 | + | cd Desktop | |
| 77 | + | cd a | |
| 78 | + | dpkg -i *.deb | |
| 79 | + | ``` | |
| 80 | + | ||
| 81 | + | This last command will install Free Pascal and Free Pascal source code. | |
| 82 | + | ||
| 83 | + | #### Errors | |
| 84 | + | ||
| 85 | + | Ideally, everything would run smoothly and the installation would complete without error. However when I did it, there were a number of errors. These errors are sometimes 'show-stoppers' so they should be sorted out if possible. The most common error is a missing dependency, as happened to me. | |
| 86 | + | ||
| 87 | + | #### Missing Dependencies | |
| 88 | + | ||
| 89 | + | This means that a package that Lazarus expects to be installed on your system already is not there. The missing packages were: | |
| 90 | + | ||
| 91 | + | - libgtk2-dev | |
| 92 | + | - libogg-dev | |
| 93 | + | - libvorbis-dev | |
| 94 | + | - libmodplug-dev | |
| 95 | + | - a52cat | |
| 96 | + | - \+ a few others. If you look through the output in the terminal you will see which packages failed to install and why it was. | |
| 97 | + | ||
| 98 | + | #### Install missing dependencies | |
| 99 | + | ||
| 100 | + | Open Synaptic. Search for each of the missing packages and install them. | |
| 101 | + | ||
| 102 | + | ##### a52cat | |
| 103 | + | ||
| 104 | + | This package is not in the Ubuntu 10.04 repository. We have to leave it and hope for the best. | |
| 105 | + | ||
| 106 | + | #### Reinstall Free Pascal | |
| 107 | + | ||
| 108 | + | Repeat the previous installation procedure with: Open a terminal. | |
| 109 | + | ||
| 110 | + | ``` bash | |
| 111 | + | cd Desktop | |
| 112 | + | cd a | |
| 113 | + | dpkg -i *.deb | |
| 114 | + | ``` | |
| 115 | + | ||
| 116 | + | Free Pascal will now install fairly smoothly. | |
| 117 | + | ||
| 118 | + | ##### fp-units-multimedia | |
| 119 | + | ||
| 120 | + | Only the multimedia unit will not install. This is due to the missing a52cat package. However it may not be critical. | |
| 121 | + | ||
| 122 | + | #### Check the installation | |
| 123 | + | ||
| 124 | + | You can check the Free Pascal installation in three ways: | |
| 125 | + | ||
| 126 | + | - Run it | |
| 127 | + | ||
| 128 | + | Open a terminal | |
| 129 | + | ||
| 130 | + | `fpc` | |
| 131 | + | ||
| 132 | + | it should open in the terminal. | |
| 133 | + | ||
| 134 | + | - Look in Synaptic and check that fpc and fpc-src have been installed. | |
| 135 | + | - Find the files | |
| 136 | + | ||
| 137 | + | You can see where the files are stored with | |
| 138 | + | ||
| 139 | + | ``` bash | |
| 140 | + | sudo dpkg -L fpc | |
| 141 | + | ``` | |
| 142 | + | ||
| 143 | + | ### Install Lazarus | |
| 144 | + | ||
| 145 | + | This is similar to Free Pascal | |
| 146 | + | ||
| 147 | + | Open a terminal. | |
| 148 | + | ||
| 149 | + | ``` bash | |
| 150 | + | cd Desktop | |
| 151 | + | cd b | |
| 152 | + | dpkg -i *.deb | |
| 153 | + | ``` | |
| 154 | + | ||
| 155 | + | and the installation will proceed. | |
| 156 | + | ||
| 157 | + | #### Errors | |
| 158 | + | ||
| 159 | + | An error occurs installing package lcl-qt4-0.9.30. | |
| 160 | + | ||
| 161 | + | ##### lcl-qt4-0.9.30 | |
| 162 | + | ||
| 163 | + | From the terminal output you can see that the unit can not be installed due to a dependency on ... However, if you read the information that appears in Synaptic for this package then it says | |
| 164 | + | ||
| 165 | + | "Actually this is an empty package but ..." | |
| 166 | + | ||
| 167 | + | I think we can safely ignore it. | |
| 168 | + | ||
| 169 | + | #### Test | |
| 170 | + | ||
| 171 | + | Open Lazarus and try to create a simple 'Hello World' application with a button click. It worked with mine and the installation is complete. | |
| 172 | + | ||
| 173 | + | ##### Check with Synaptic | |
| 174 | + | ||
| 175 | + | You can check that Lazarus has been installed with Synaptic | |
| 176 | + | ||
| 177 | + | ##### Fix Broken packages | |
| 178 | + | ||
| 179 | + | Unfortunately, I now have 2 broken packages on my Ubuntu system, fp-multimedia and lcl-qt4. I choose 'Edit/Fix broken Packages and the fp-multimedia unit goes green but the lcl-qt4 package goes bright red - not normally a good sign. However if you select | |
| 180 | + | ||
| 181 | + | `Apply` | |
| 182 | + | ||
| 183 | + | then Ubuntu will fix the multimedia package and remove the qt4 package. Everything is then in order. | |
| 184 | + | ||
| 185 | + | ### Final test | |
| 186 | + | ||
| 187 | + | Create a Hello World application with a button and a label. If this works then things are looking good. Lazarus is installed. | |
| 188 | + | ||
| 189 | + | ## See also | |
| 190 | + | ||
| 191 | + | - [[Install on Ubuntu]] | |
| 192 | + | ||
| 193 | + | --- | |
| 194 | + | *From the Free Pascal wiki, page "Install on Ubuntu from .deb files", as it stood on 2022-06-05 after a change by Malcome, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).* | |
| 195 | + | Category: Install | |
| 196 | + | Category: Ubuntu |
