Как установить qcad в ubuntu

Обновлено: 07.07.2024

Не редко необходимые пакеты можно найти только в виде исходных текстов, в данной статье описывается метод установки пакета из исходных текстов.

Программы обычно распространяются в упакованных архивах, это файлы с расширениями

Нужно понимать отличие между архиватором и упаковщиком.

Для архивации директорий и файлов используется программа tar; результатом её работы является файл с расширением .tar. Грубо говоря, это копия файловой системы - директорий и файлов с их атрибутами и правами доступа, помещённая в один файл.

Данный файл по размеру будет чуть больше, чем суммарный размер файлов, которые были архивированы. Поэтому (а может и по другой причине) используют упаковщики - программы, которые позволяют уменьшить размер файла без потери данных.

Программа tar умеет распаковывать, поэтому не нужно вызывать gunzip, а можно просто указать программе tar, что файл нужно cначала распаковать. Например, команда

сразу распакует и разархивирует. Отличие файлов с расширениями

лишь в том, что использовались разные упаковщики, программа tar определяет метод сжатия автоматически и дополнительных опций в данном случае не требуется.

После распаковки необходимо перейти в полученный каталог, все описываемые ниже команды выполняются в каталоге с исходными текстами пакета.

Для сборки программ в GNU/Linux используется (в основном) программа make, которая запускает инструкции из Makefile, но поскольку дистрибутивов GNU/Linux много, и они все разные, то для того чтобы собрать программу, нужно для каждого дистрибутива отдельно прописывать пути,где какие лежат библиотеки и заголовочные файлы. Программисты не могут изучать каждый дистрибутив и для каждого отдельно создавать Makefile. Поэтому придумали конфигураторы, которые «изучают» систему, и в соответствии с полученными знаниями создают Makefile. Но на конфигураторе они не остановились и придумали конфигураторы конфигураторов …на этом они остановились

Для сборки нам нужны компиляторы: они прописаны в зависимостях пакета build-essential, так что достаточно установить его со всеми зависимостями. Ещё нужны autoconf и automake.

Итак, чтобы собрать что-то из исходников, нужно сначала собрать конфигуратор; как собрать конфигуратор, описано в файле configure.in. Для сборки конфигуратора необходимо выполнить

Если таких скриптов в архиве не оказалось, то можно выполнить последовательно следующие команды:

Все эти команды используют файл configure.in. После выполнения этих команд создастся файл configure. После этого необходимо запустить конфигуратор для проверки наличия всех зависимостей, а также установки дополнительных опций сборки (если возможно) и просмотра результата установки (опционально- может не быть)

Конфигуратор построит Makefile основываясь на полученных знаниях и файле makefile.am. Можно передать конфигуратору опции, предусмотренные в исходниках программы, которые позволяют включать/отключать те или иные возможности программы, обычно узнать о них можно командой

Также есть набор стандартных опций, вроде

, которая указывает, какой каталог использовать для установки. Для Ubuntu обычно

БЕЗ слеша в конце! Теперь можно запустить процесс сборки самой программы командой

Для сборки достаточно привелегий обычного пользователя. Окончанием сборки можно считать момент, когда команды в консоли перестанут «беспорядочно» выполняться и не будет слова error. Теперь всё скомпилировано и готово для установки.

Усилия потраченные на Правильную установку в последствии с лихвой окупятся в случае удаления или обновления устанавливаемого программного обеспечения.

Правильная установка(Вариант №1)

Установка при помощи утилиты checkinstall. Для установки выполните

Минус данного способа: checkinstall понимает не все исходники, поскольку автор программы может написать особые скрипты по установке и checkinstall их не поймёт.

Для создания и установки deb-пакета необходимо выполнить

Правильная установка(Вариант №2)

Быстрое создание deb-пакета «вручную».

Основное отличие от предыдущего способа заключается в том, что в данном случае вы создаете пакет вручную и отслеживаете все вносимые изменения. Так же этот способ подойдет вам, если исходники не поддерживают сборку пакета с checkinstall. Производим установку во временную директорию, где получаем весь набор устанавливаемых файлов: Создадим в «корне пакета» директорию DEBIAN и сложим в DEBIAN/conffiles список всех файлов, которые должны попасть в /etc: После чего создаём файл DEBIAN/control следующего содержания: При необходимости там же можно создать скрипты preinst, postinst, prerm и postrm. Получаем на выходе tempinstall.deb, который и устанавливаем

Установка (вариант №3)

Процедура создания deb-пакета подробно описана в данной статье.

Неправильная установка

Минус данного способа заключается в том, что если вы устанавливаете напрямую через make install, то нормально удалить или обновить пакет вы, скорее всего, не сможете. Более того, установка новой версии поверх старой, скорее всего, затрёт ваши изменения в конфигах. make install делает ровно то, что ему сказано — производит установку файлов в нужные места, игнорируя тот факт, что там что-то уже есть. После этого процесса совершенно никакой информации о том, что и куда ставилось, получить в удобоваримом виде невозможно. Иногда, конечно, Makefile поддерживает действие uninstall, но это встречается не так часто, да и не факт, что корректно работает. Кроме того, вам будет необходимо хранить для деинсталяции распакованное дерево исходников и правил сборки.

Для установки необходимо выполнить

Для удаления пакета, установленного данным способом необходимо выполнить в корневой директории исходников программы (там где вы запускали make install).

Пакеты с буквами mm в конце описания — это пакеты для C++ программ. Список для bmpx, но подойдёт почти для любой GTK2/Gnome программы. Так что если не получается собрать, то посмотрите на этот список и сверьте с тем что у вас установлено.

  • From a DVD you purchase from the QCAD website.
  • As a file you download over the Internet after ordering your license online.

In either case, you will receive the same files that are required to install QCAD on the hard disk of your computer. Both the download site as well as the DVD contain multiple files for different operating systems. The following sections will explain which file to use for your operating system and how to install it.

Installing QCAD under Windows

This section is only for users of the Windows operating system.

Getting the Setup File

Finding out if your Windows is 32bit or 64bit

If you are not sure if you are running a 32bit or a 64bit version of Windows, please refer to the Windows web site to learn how to find out.

Installation from DVD

In case you have a DVD, insert it now into the DVD drive of your computer. Then launch Windows Explorer to see the contents of the DVD:

  1. Click the Start button in the lower left corner of your screen and navigate to All Programs - Accessories where you will find an application called Windows Explorer. Click on Windows Explorer to launch it.
  2. Navigate to My Computer > CD Drive.
  3. The file you need to install QCAD is called qcad-3.x.x-pro-win32-installer.msi or qcad-3.x.x-pro-win64-installer.msi and is located in the folder installation\3.x\windows\32bit or installation\3.x\windows\64bit. Note that 3.x is the version number in the file name, for example 3.22.

Installation from Download

If you have purchased the downloadable version of QCAD, use your browser to access your personal download area. You can find detailed instructions in the e-mail you have received after your purchase or in the customer area of the QCAD website. In your download area, download the file that is labeled with QCAD Professional Windows 32bit (Installer) or QCAD Professional Windows 64bit (Installer), depending on your operating systems architecture (see above). After the download has finished, use Windows Explorer to find the file on your hard disk.

Installation

Doubleclick the file qcad-3.x.x-pro-win32-installer.msi or qcad-3.x.x-pro-win64-installer.msi either from the DVD or from the folder to which you have downloaded it. Follow the instructions on screen to install QCAD. During the installation you can choose in which folder to install QCAD. All QCAD application files will be installed at that location. The default location is C:\Program Files\QCAD. It is not recommended to change this unless you are sure you want to install QCAD in a different location. When the installation has finished, there is no need to restart your computer. You can also remove the DVD from your DVD drive at this point.

Launching QCAD

To launch QCAD, doubleclick the QCAD icon on the desktop or click on the Start button and choose All Programs > QCAD > QCAD.

Uninstalling

To uninstall QCAD, please use the Software uninstall feature of Windows:

  • Windows 7: Start > Control Panel > Programs > Uninstall a program
  • Windows 10: Click the Windows icon at the bottom left > Click the cog wheel (Settings) > Apps > QCAD > Uninstall

Installing QCAD under macOS

This section of this page is only for users of the macOS operating system. If you have an Apple Macintosh computer, you are most likely using macOS. There are different versions of the macOS operating system. The file you need to install depends on your version of macOS.

For the sake of brevity, the version numbers in these instructions are indicated as 3.x.x. Replace this number with the actual version number of the downloaded / purchased QCAD release, for example 3.22.1.

Finding out your Version of macOS

First you need to find out what exact version of macOS you are using. To do this, please proceed as follows:

  1. Click with your mouse on the Apple icon at the top left corner of your screen.
  2. Click the item About This Mac. This will show a dialog which indicates the version number of the macOS system that is installed .

The version number is displayed right underneath the label macOS, for example 10.14. Memorize or write down the version number that is displayed on your system.

Getting the Correct Setup File

Installation from DVD

In case you have a DVD, insert it now into the DVD drive of your computer.

  1. A DVD icon appears on your desktop. Double click on it to show the contents of the DVD.
  2. If your version number of macOS starts with 10.14, you will need to install the file named installation/macOS/qcad-3.x.x-pro-macos-10.14.dmg. In this case you are using macOS 10.14.
  3. If your version number of macOS starts with 10.10, 10.11, 10.12 or 10.13, you will need to install the file named installation/macOS/qcad-3.x.x-pro-macos-10.10-10.13.dmg.
  4. If your macOS version number is lower or higher use the appropriate installer which covers that version.
  5. Note that '3.x.x' in the file names stands for the version of QCAD you have purchased, for example '3.22.1'.

Installation from Download

If you have purchased the downloadable version of QCAD, use your browser to access your personal download area. You can find detailed instructions in the e-mail you have received after your purchase. Most likely, you can simply click on a link in your e-mail application or web mail to go directly to the QCAD website and access your download area. In the download area, download the file that is labeled with the version of your macOS installation, for example "macOS 10.14", "macoS 10.10-10.13", etc., depending on your version of macOS. After the download has finished, use Finder to locate the file on your hard disk.

Installation

Double-click the file you have located in the previous section either from the DVD or from the folder to which you have download it. The file is a disk image that contains the QCAD application. By double-clicking on it, the contents of the file is shown:


Drag the QCAD Application icon on the left to the Applications folder that is shown at the right in the same Finder window for convenience.

Launching QCAD

QCAD is now installed on your system. To launch it, open the Applications folder and double-click on the application icon QCAD.

Uninstalling

To remove QCAD from a computer, simply drag the QCAD icon from your Applications folder to the Trash icon in your dock.

Installing QCAD under Linux Systems

This section of this page is only for users of the Linux operating system.

For the sake of brevity, the version numbers in these instructions are indicated as 3.x.x. Replace this number with the actual version number of the downloaded / purchased QCAD release, for example 3.22.1.

Getting the Correct Installation File

Alternatively, there are also tar.gz archives for advanced users who wish to install QCAD manually.

The recommended way to install QCAD on a Linux system is on the console. Please open a console application such as Konsole or xterm. If you have a DVD, insert it into your DVD drive and copy the correct file to your hard disk. For example:

Replace 'myname' with your login name. The exact location where your DVD drive is mounted might be different and depends on your Linux distribution.

Navigate to the location where you have copied or downloaded the installation file. You can use the command cd for that:

Now install the file by making it executable and run it:

This will create the directory /home/myname/opt/qcad-3.x.x-pro-linux-x86_32 which contains the QCAD application.

Installation using the tar.gz archive

Extract the tar.gz file into any directory of your choice. For this example installation, we use /home/myname/opt:

Launching QCAD

Troubleshooting

If QCAD does not run, you might not have all dependencies (required system libraries) installed.

You can check for unmet dependencies as follows:

If you get any "Not found" messages, you need to install the appropriate packages / libraries first.

If you get errors related to GLIBC, you'll have to install the Qt 4 legacy package (with "qt4" in the file name).

32bit QCAD on 64bit Linux

It is also possible (though usually not recommended) to install 32bit QCAD on a 64bit Linux distribution. Most 64bit Linux distributions require additional libraries to be installed before 32bit QCAD can be run:

Fedora 17, 64bit

Some 32bit libraries need to be installed. Since 64bit library versions have to match with 32bit library versions, some 64bit libraries might need to be updated first (alternatively, you can also install older versions for the 32bit libraries).

OpenSUSE 12.1, 64bit

Install the following packages with the YaST - Software Management tool, including automatically resolved dependencies:

OpenSUSE 12.2, 64bit
OpenSUSE 12.3, 64bit

Install the following packages with the YaST - Software Management tool, including automatically resolved dependencies:

Ubuntu 12.04, 64bit
Ubuntu 12.10, 64bit
Debian 6, 64bit

Install package ia32-libs, for example using apt-get:

Some distributions (e.g. Debian 6, 64bit) also require a package called ia32-libs-gtk:

Uninstalling

When using the QCAD installer, QCAD installs into

/opt, that's the opt directory in your home folder, for example /home/user/opt if your user name is "user". To uninstall QCAD, simply remove the QCAD installation directory, for example

These installation instructions for Linux are extremely verbose and intended for users who are not familiar with the Linux operating system or who have little or no experience using such a system. If you are an experienced Linux user, installing QCAD is a simple one-step procedure consisting of running the downloaded installer file from your favourite file manager or terminal.

Please note that Linux is not an operating system for the faint-hearted. You will have to invest some time to very carefully follow the instructions below step by step.

Accessing your Download Page

After your purchase, you have received an e-mail with the subject Order / Commande / Bestellung [order number] where [oder number] is your order number.

Find that e-mail now in your e-mail program or in your web based e-mail service and click on the download link in that e-mail to show your download area.

If you cannot find this e-mail, please check also your spam or bulk e-mail folder.

If you still cannot find that e-mail, please follow our detailed instructions for downloading QCAD.

At this point, you should have your download area open in your browser.


Do not proceed if you do not have this page open in your browser.

32bit or 64bit?

Next you need to find out if you are running a 32bit or a 64bit Linux operating system. Note that the actual architecture of your CPU (32bit or 64bit) is not relevant. You need to find our if you have a 32bit or a 64bit operating system. Depending on your exact Linux distribution, there are more or less painful ways to find this out:

  • Ubuntu 13, 14, 15:
    • Click on the gear icon at the top right and click About This Computer:
    • Check under OS Type if you are using a 32bit or a 64bit system:
    • First you need to open System Settings. This can be done either in the dash, or by going to the gear icon (top right, see above). From there you need to open System Info. Under the Ubuntu Logo and Version Number, a line will list OS type 32bit or 64-bit.
    • You need to use what is called a terminal or console application. This is a program that can be used to execute commands on your operating system. Look under Applications > Accessories or similar for an entry labeled Terminal:
    • Once you see the terminal application, enter this exact text: That is uname, followed by a space, a dash (-) and a small letter m.
      Once you are convinced that you have entered this exact text string correctly, press the enter key on your keyboard. This is the key a the right of your keyboard you usually use to start a new line when typing text into a text editor. It is typically labeled Enter or Return or with a symbol that looks like this: ↵
    • The terminal will now show some information.
    • If that information is x86_64, you are using a 64bit Linux system:
    • If the information is i686, you are using a 32bit Linux system:
    • Write down what system you are using and close the terminal application clicking the red x symbol at the top left.

    At this point, you should know if you are running a 32bit or a 64bit operating system.

    Do not proceed if this is not the case or you are not sure about this.

    Downloading the Correct File

    Please click on the QCAD 3.21.3 for Linux folder to expand it. Depending on the current version of QCAD, the version number might be different.

    If you are using a 32bit Linux System, and then click the download link labelled QCAD Professional Linux 32bit (Installer):


    If you are using a 64bit Linux System, and then click the download link labelled QCAD Professional Linux 64bit (Installer):


    Depending on your browser preferences, your download will now start or you will be asked where you want to save the file. If you are asked where you want to save the file, save it to your desktop, so you can find it after downloading. If you are not asked, the file will most likely be saved in the Downloads folder of your home directory.

    At this point, you should have downloaded the correct file for your system.

    The file should be visible on your desktop or you should know where to find it on your disk.

    Do not proceed if you cannot download the file or you cannot find your downloaded file on disk.

    Making the Downloaded File Executable

    To protect you from accidentally executing a downloaded file, Linux has made the downloaded file non-executable. This means that we now need to explicitly make it executable again.

    Like all things Linux, it greatly depends on the distribution and distribution version how this can be done:

    • Ubuntu:
      • Right-click on the downloaded file on your Desktop or in your Downloads folder and click Properties:
      • Switch to the Permissions tab and tick the check box Allow executing file as program:

        Do NOT change any of the other settings.
      • Click the OK button. If the dialog does not have an OK button, you can simply close the dialog clicking the X button at the top left.
      • Do NOT double-click the downloaded file at this point. It will likely not work but open a text editor which is not what we want to do.
      • Other Linux distributions should have a similar way to make a file executable.
        You might have to try different options or search the Internet for a way to do this.
        Search for your Linux distribution name followed by how to make a file executable.

      At this point you should have the downloaded file on your Desktop or in your Downloads folder and it should be executable.

      Allowing Executable Files to be Executed

      Your file manager will likely open a text editor when double-clicking the downloaded file at this point. Since we do not want that, we need to tell the file manager that it should execute executable files.

      Again, this greatly depends on your Linux distribution, version thereof as well as the file manager that is being installed and used:

      • Ubuntu:
        • Open the file manager, likely named Files:
        • Choose the menu Edit > Preferences. If the Edit menu is not visible, move the mouse close to the position, where it should be visible first (at the top). It should then appear.

          In other versions of the system, the menu might be located at the right:
        • Click on the Behavior tab of the preferences dialog and check the check box Ask each time or Ask what to do under Executable Text Files:
        • Click the OK button or close the dialog if there is no OK button.

        Your system and the downloaded file should now be ready for the installation of QCAD.

        Installing QCAD


        • Double-click the downloaded QCAD installer with the left mouse button.
        • Your system will now show a dialog, asking you what to do with the file. Click the Run button:

        • QCAD will now be installed on your system into a directory called opt in your home folder.

        Running QCAD

        The installer also creates a desktop icon which you can then use to launch QCAD by double-clicking it.

        Note: if you have already purchased QCAD Professional or QCAD/CAM, you can access your purchased software and e-books as well as updates directly through the download link that was sent to you via e-mail directly after your purchase. The e-mail subject is "Order / Commande / Bestellung" + your order number. More information.

        QCAD Professional Trial

        These packages contain QCAD, bundled with a free trial of QCAD Professional. The trial runs 15min at a time and can then be restarted. You can order QCAD Professional from our Online Shop and download the full version immediately. Alternatively, you can choose to remove the trial and use the reduced free QCAD Community Edition instead.

        Windows

        macOS

        Linux

        QCAD/CAM Trial

        These packages contain a free trial version of QCAD/CAM. You can order QCAD/CAM from our Online Shop and download the full version immediately.

        Windows

        macOS

        Linux

        All Downloads

        QCAD with QCAD Professional Trial

        QCAD/CAM Trial

        QCAD Community Edition

        If you are looking for the free open source QCAD Community Edition, you can download the trial version for your platform (see above) and then remove the QCAD Professional add-on running in trial mode (click Remove in the Trial widget and follow on screen instructions).

        Alternatively, you may compile your own package from sources below.

        QCAD Community Edition Source Code

        The source code of QCAD version 3.26.4 is released under the terms of the GNU General Public License version 3 (GPLv3).
        Please note that the GPLv3 applies to the source code of QCAD 3.26.4 only, not to source code of 3rd party libraries or other resources contained in the package (user manual, fonts, patterns, etc.). For a complete list of licenses, please refer to the file LICENSE.txt contained in the package.

        For help and support, please browse our user forum or post your questions there.

        This is source code intended for computer savvy developers. Source code needs to be compiled using a C++ compiler.
        This is NOT an installer. Installers are available at the top of this page.

        Qt Source Code

        QCAD uses Qt 5, a cross-platform C++ framework. You can download the source code of Qt 5.10.1 for all platforms from the link below, or obtain it from the Qt Company.

        The LGPL Open Source license under which Qt ships with QCAD, confers various rights to you as the user, including the right to recompile the Qt libraries for your platform. To do that follow the documentation shown on the Qt website.

        Читайте также: