Clion не запускается ubuntu

Обновлено: 04.07.2024

Ни для кого не секрет, что многие, кто пользуются Linux интересуются программированием. Продукты от JetBrains уже являются дефакто инструментами разработки "по умолчанию" для многих языков программирования.

Ubuntu разработала очень удобный инструмент доставки приложений с помощью Snap пакетов на многие дистрибутивы Linux. Этот инструмент подробно разобрали в этой статье: Установка snap пакетов в Ubuntu и других дистрибутивах Linux.

А это значит, что каждый инструмент разработки можно установить всего лишь одной командой в терминале, который будет обновляться.

В этой статье я не буду делать обзор каждого инструмента, а просто хочу популяризировать наиболее удобный вариант установки IDE от JetBrains, которыми сам пользуюсь.

Надеюсь, что данная статья будет полезна тем, кто пользовался этими продуктами на других операционнах системах и решили поставить тот же самый инструмент на Ubuntu / Linux.

В данной статье будут описаны только варианты установки с помощью Snap пакетов.

Самая умная и удобная среда разработки для Java, включающая поддержку всех последних технологий и фреймворков. IntelliJ IDEA предоставляет инструменты для продуктивной работы и идеально подходит для создания коммерческих, мобильных и веб-приложений.

Установка IntelliJ IDEA в Ubuntu / Linux.

Для того, чтобы установить IntelliJ IDEA Ultimate в Ubuntu / Linux, выполните следующую команду в терминале:

Для того, чтобы установить IntelliJ IDEA Community Edition в Ubuntu / Linux, выполните следующую команду в терминале:

Все остальные инструменты построены на базе платформы IntelliJ, следовательно имеют схожий интерфейс.

WebStorm – среда для разработки на JavaScript, которая подходит для client-side-разработки, создания приложений на Node.js и мобильных приложений на React Native.

Установка WebStorm в Ubuntu / Linux.

Для того, чтобы установить WebStorm в Ubuntu / Linux, выполните следующую команду в терминале:

PyCharm – это самая интеллектуальная Python IDE с полным набором средств для эффективной разработки на языке Python.

Выпускается в двух вариантах – бесплатная версия PyCharm Community Edition и поддерживающая больший набор возможностей PyCharm Professional Edition. PyCharm выполняет инспекцию кода на лету, автодополнение, в том числе основываясь на информации, полученной во время исполнения кода, навигацию по коду, обеспечивает множество рефакторингов.

Установка PyCharm в Ubuntu / Linux.

Для того, чтобы установить PyCharm Professional Edition в Ubuntu / Linux, выполните следующую команду в терминале:

Для того, чтобы установить PyCharm Community Edition в Ubuntu / Linux, выполните следующую команду в терминале:

PhpStorm – это интегрированная среда разработки на PHP с интеллектуальным редактором, которая глубоко понимает код, поддерживает PHP 5.3-7.3 для современных и классических проектов, обеспечивает лучшее в индустрии автодополнение кода, рефакторинги, предотвращение ошибок налету и поддерживает смешивание языков.

Установка PhpStorm в Ubuntu / Linux.

Для того, чтобы установить PhpStorm в Ubuntu / Linux, выполните следующую команду в терминале:

RubyMine — умная и удобная интегрированная среда разработки для языка Ruby и веб-фреймворка Rails, которая включает в себя все необходимые разработчику инструменты и поддерживает наиболее востребованные технологии из мира Ruby.

Установка RubyMine в Ubuntu / Linux.

Для того, чтобы установить RubyMine в Ubuntu / Linux, выполните следующую команду в терминале:

DataGrip – IDE для написания SQL-запросов и работой с базами данных. Поддерживает MySQL, PostgreSQL, AWS Redshift, Microsoft SQL Server, Microsoft Azure, Oracle, Sybase, DB2, SQLite, HyperSQL, Apache Derby и H2.

Установка DataGrip в Ubuntu / Linux.

Для того, чтобы установить DataGrip в Ubuntu / Linux, выполните следующую команду в терминале:

Задача GoLand — предоставить тот же уровень удобства при программировании на Go, который PyCharm обеспечивает для Python, а IntelliJ IDEA — для Java. В GoLand вас ждет умное автодополнение кода, мгновенные инспекции, быстрые исправления и удобная навигация.

Установка GoLand в Ubuntu / Linux.

Для того, чтобы установить GoLand в Ubuntu / Linux, выполните следующую команду в терминале:

CLion — умная IDE, предназначенная для разработки на С и С++ на платформах Linux, Windows и macOS. Включает в себя поддержку системы сборки кросс-платформенных проектов CMake, Gradle C++ и compilation database, возможности анализа кода на лету, разнообразные рефакторинги и унифицированный интерфейс для работы с самыми популярными системами контроля версий.

Установка CLion в Ubuntu / Linux.

Для того, чтобы установить CLion в Ubuntu / Linux, выполните следующую команду в терминале:

Установка Rider в Ubuntu / Linux.

Для того, чтобы установить Rider в Ubuntu / Linux, выполните следующую команду в терминале:

Android Studio основана на программном обеспечении IntelliJ IDEA от компании JetBrains, - официальное средство разработки Android приложений. Данная среда разработки доступна для Windows, OS X и Linux.

Данное приложение разрабатывается компанией Google на основе продукта IntelliJ IDEA, а не самой компанией JetBrains. Пока Google официально не добавили snap пакет этой IDE, а собирается и обновляется пользователями (Snapcrafters).

Не могу не добавить инструкцию установки этой IDE, которая полностью бесплатная.

Установка Android Studio в Ubuntu / Linux.

Для того, чтобы установить Android Studio в Ubuntu / Linux, выполните следующую команду в терминале:

CLion is a cross-platform IDE that provides consistent experience on Windows, macOS, and Linux (for setup on FreeBSD, refer to this instruction).

System requirements

2 GB of free RAM

8 GB of total system RAM

Multi-core CPU. CLion supports multithreading for different operations and processes making it faster the more CPU cores it can use.

2.5 GB and another 1 GB for caches

SSD drive with at least 5 GB of free space

Officially released 64-bit versions of the following:

Microsoft Windows 8 or later

macOS 10.13 or later

Any Linux distribution that supports Gnome, KDE, or Unity DE * .

Pre-release versions are not supported.

Latest 64-bit version of Windows, macOS, or Linux (for example, Debian, Ubuntu, or RHEL)

* CLion is not available for some Linux distributions, such as RHEL6/CentOS6, which do not include glibc version 2.14 required by JBR 11.

You do not need to install Java to run CLion because JetBrains Runtime is bundled with the IDE (based on JRE 11).

Toolchain requirements

In case of using MSVC compiler: Visual Studio 2013, 2015, 2017, or 2019

In case of using WSL: Windows 10 Fall Creators Update (least version 1709, build 16299.15)

Xcode command line developer tools (to install, use the xcode-select --install command)

In case of using custom CMake: version 2.8.11 or later

In case of using custom GDB: version 7.8.x-10.2 or later

Install using the Toolbox App

The JetBrains Toolbox App is the recommended tool to install JetBrains products. Use it to install and manage different products or several versions of the same product, including Early Access Program (EAP) and Nightly releases, update and roll back when necessary, and easily remove any tool. The Toolbox App maintains a list of all your projects to quickly open any project in the right IDE and version.

Install the Toolbox App

Download the installer .exe from the Toolbox App web page.

Run the installer and follow the wizard steps.

After you run the Toolbox App, click its icon in the notification area and select which product and version you want to install.

Log in to your JetBrains Account from the Toolbox App and it will automatically activate the available licenses for any IDE that you install.

Install the Toolbox App

Download the disk image .dmg from the Toolbox App web page.

There are separate disk images for Intel and Apple Silicon processors.

Mount the image and drag the JetBrains Toolbox app to the Applications folder.

After you run the Toolbox App, click its icon in the main menu and select which product and version you want to install.

CLion in the Toolbox app

Log in to your JetBrains Account from the Toolbox App and it will automatically activate the available licenses for any IDE that you install.

Install the Toolbox App

Download the tarball .tar.gz from the Toolbox App web page.

Extract the tarball to a directory that supports file execution.

For example, if the downloaded version is 1.17.7391, you can extract it to the recommended /opt directory using the following command:

Execute the jetbrains-toolbox binary from the extracted directory to run the Toolbox App and select which product and version you want to install. After you run the Toolbox App for the first time, it will automatically add the Toolbox App icon to the main menu.

Log in to your JetBrains Account from the Toolbox App and it will automatically activate the available licenses for any IDE that you install.

You can use this shell script that automatically downloads the tarball with the latest version of the Toolbox App, extracts it to the recommended /opt directory, and creates a symbolic link in the /usr/local/bin directory.

Standalone installation

You can install CLion manually and have the option to manage the location of every instance and all the configuration files. This is useful, for example, if you have a policy that requires specific install locations.

Run the installer and follow the wizard steps.

On the Installation Options step, you can configure the following:

Create a desktop shortcut for launching CLion.

Add the directory with CLion command-line launchers to the PATH environment variable to be able to run them from any working directory in the Command Prompt.

Add the Open Folder as Project action to the system context menu (when you right-click a folder).

Associate specific file extensions with CLion to open them with a double-click.

To run CLion, find it in the Windows Start menu or use the desktop shortcut. You can also run the launcher batch script or executable in the installation directory under bin .

Extract the archive to the desired folder.

To run CLion, use the launcher batch script or executable in the extracted directory under bin .

There are separate disk images for Intel and Apple Silicon processors.

Mount the image and drag the CLion app to the Applications folder.

Run the CLion app from the Applications directory, Launchpad, or Spotlight.

Unpack the downloaded CLion-*.tar.gz archive. The recommended extract directory is /opt :

Do not extract the tarball over an existing installation to avoid conflicts. Always extract to a clean directory.

Execute the CLion.sh from bin subdirectory to run CLion:

To create a desktop entry, do one of the following:

On the Welcome screen, click Configure | Create Desktop Entry

From the main menu, click Tools | Create Desktop Entry

When you run CLion for the first time, some steps are required to complete the installation, customize your instance, and start working with the IDE.

Silent installation on Windows

Silent installation is performed without any user interface. It can be used by network administrators to install CLion on a number of machines and avoid interrupting other users.

To perform silent install, run the installer with the following switches:

/S : Enable silent install

/CONFIG : Specify the path to the silent configuration file

/D : Specify the path to the installation directory

This parameter must be the last in the command line and it should not contain any quotes even if the path contains blank spaces.

To check for issues during the installation process, add the /LOG switch with the log file path and name between the /S and /D parameters. The installer will generate the specified log file. For example:

clion.exe /S /CONFIG=d:\temp\silent.config /LOG=d:\JetBrains\CLion\install.log /D=d:\IDE\CLion

Silent configuration file

The silent configuration file defines the options for installing CLion. With the default options, silent installation is performed only for the current user: mode=user . If you want to install CLion for all users, change the value of the installation mode option to mode=admin and run the installer as an administrator.

The default silent configuration file is unique for each JetBrains product. You can modify it to enable or disable various installation options as necessary.

It is possible to perform silent installation without the configuration file. In this case, omit the /CONFIG switch and run the installer as an administrator. Without the silent configuration file, the installer will ignore all additional options: it will not create desktop shortcuts, add associations, or update the PATH variable. However, it will still create a shortcut in the Start menu under JetBrains .

Install as a snap package on Linux

You can install CLion as a self-contained snap package. Since snaps update automatically, your CLion installation will always be up to date.

To use snaps, install and run the snapd service as described in the installation guide.

On Ubuntu 16.04 LTS and later, this service is pre-installed.

CLion is distributed via two channels:

The stable channel includes only stable versions. To install the latest stable release of CLion, run the following command:

The --classic option is required because the CLion snap requires full access to the system, like a traditionally packaged application.

The edge channel includes EAP builds. To install the latest EAP build of CLion, run the following command:

When the snap is installed, you can launch it by running the clion.sh command.

To list all installed snaps, you can run sudo snap list . For information about other snap commands, see the Snapcraft documentation.

In this article, I will show you how to install and configure CLion C/C++ IDE on Ubuntu. So, let’s get started.


Now, click on Download.


Now, make sure Linux is selected. Then, click on DOWNLOAD.


Your browser should prompt you to save the file. Just select Save File and click on OK.


As you can see, the CLion archive is being downloaded.


Installing C/C++ Build Tools:

In this section, I will show you how to install C/C++ build tools on Ubuntu. So, we will be able to compile C/C++ programs on CLion once we get it installed.

First, update the APT package repository cache with the following command:


The APT package repository cache should be updated.


Now, install C/C++ development tools with the following command:

Now, press y and then press <Enter> to continue.


C/C++ build tools should be installed.


Installing CLion:

In this section, I will show you how to install CLion on Ubuntu. Let’s get started.

First, navigate to the

/Downloads directory with the following command:


As you can see, the CLion archive file I just downloaded is here. Remember the filename.


Now, run the following command to extract the contents of the archive to the /opt directory.


Once the archive is extracted, a new directory should be created inside the /opt directory as you can see in the screenshot below. Note the directory name.


Now, run CLion with the following command:


As you’re running CLion for the first time, you will have to do some initial configuration. Once you see the following window, click on Do not import settings and click on OK.


Now, select either the Dark theme Darcula or the Light theme. Then, click on Next: Toolchains as marked in the screenshot below.


As you can see, all the C/C++ development tools are automatically detected. Now, click on Next: Default plugins.

Now, you will be asked to tune CLion depending on what you do. For example, if you do web development along with C/C++, then you can keep the Web Development tools. If you don’t need it, just click on Disable All, and web development functionalities will be disabled.

Once you’re done, click on Next: Featured plugins.


Now, CLion will suggest you some popular plugins that you can install to add more functionalities to CLion. For example, if you work with GitHub, then the Markdown plugin is very important for you. So, you can click on Install to install it as CLion plugin. Once you’re done, click on Next: Desktop Entry.


Now, make sure both of the checkboxes are checked. Then, click on Start using CLion as marked in the screenshot below.


Now, type in your login user’s password and click on Authenticate.

CLion will create desktop icons so that you will be able to launch CLion from the Application Menu of Ubuntu. You don’t have to start it from the command line ever again.


Now, you have to activate CLion. CLion is not free to use. You will have to buy a license from JetBrains in order to use CLion. You can activate CLion from here if you have valid license.


If you want to try out CLion before you buy the license, then select Evaluate for free and click on Evaluate.


CLion splash screen should show up.


After a while, you will see the CLion dashboard. From here, you can create, import and manage your existing projects. The initial configuration is complete.


Now, you can easily start CLion from the Application Menu of Ubuntu.


Creating a New C/C++ Project with CLion:

In this section, I will show you how to create a new C++ project with CLion and run your first program.

First, start CLion and click on New Project from the dashboard.

Now, you should see the project creation wizard. From here, select what type of project you want to create. Then, select a location on your filesystem where you want to save the new project. You can also select the C/C++ language standard if you need to. Once you’re done, click on Create.


As you can see, I have a hello world C++ program in my project directory by default as I selected C++ Executable project.


Now, to run the program, click on the Play button as marked in the screenshot below.


As you can see, the output is as expected. You can now compile C/C++ programs as much as you want.


So, that’s how you install and configure CLion on Ubuntu. Thanks for reading this article.

однако у меня возникли проблемы с его правильной конфигурацией, отбросьте тот факт, что я пытаюсь, я не могу скомпилировать и запустить свое приложение (простой hello world one )

enter image description here

когда я пытаюсь запустить приложение, оно ссылается на "Редактировать конфигурацию", поэтому я добавил новое приложение и теперь проблема.

  1. я не могу указать цель Единственное, что я могу сделать, это установить "все цели"
  2. я не могу указать конфигурацию (все учебники, которые я нашел, имеют "отладка или запуск" здесь)
  3. исполняемый? Путь к gcc должен быть здесь? ( C:MinGWbingcc.exe)

конфигурация Rest, похоже, не требуется.

Мой CMakeList.тхт выглядит так:

Я пытаюсь выполнить это с "все цели", а также попытаться setupt выполнимый. Все, но я не могу заставить его работать.

здесь кто-нибудь, у кого были эти проблемы раньше и может посоветовать? Спасибо

я столкнулся с такой же проблемой с CLion 1.2.1 (на момент написания этого ответа) после обновления Windows 10. Он работал нормально, прежде чем я обновил свою ОС. Моя ОС установлена на диске C:\, а CLion 1.2.1 и Cygwin (64-бит) установлены на диске D:\.

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

КОРОТКИЙ ОТВЕТ: (должно быть похоже на MinGW тоже, но я не пробовал это):

ОТВЕТ:

Ниже приведены подробные шаги, которые решили эту проблему для меня:

удалить / удалить предыдущую версию Cygwin (MinGW в вашем дело)

убедитесь, что CLion обновлен

запустите Cygwin setup (x64 для моей 64-разрядной ОС)

установите по крайней мере следующие пакеты для Cygwin: gcc g++ make Cmake gdb Убедитесь, что вы устанавливаете правильные версии вышеуказанных пакетов, которые требуются CLion. Вы можете найти необходимые номера версий в разделе быстрого запуска CLion (я не могу опубликовать более 2 ссылок, пока у меня не будет больше репутации точки.)

затем вам нужно добавить Cygwin (или MinGW) в переменную среды Windows с именем 'Path'. Вы можете Google, как найти переменные среды для вашей версии Windows

[на Win 10 Щелкните правой кнопкой мыши на "этот ПК" и выберите Свойства -> расширенные Системные настройки -> переменные среды. - >в разделе "системные переменные" - > найти "путь" - > нажмите "Изменить"]

добавить папка " bin " для переменной Path. Для Cygwin я добавил: D:\cygwin64\bin

запустите CLion и перейдите в '' либо из "экрана приветствия", либо из файла - > настройки

выберите 'Сборка, Выполнение, Развертывание' а затем нажмите на кнопку 'Toolchains'

код 'среда' должен показывать правильный путь в каталог установки Cygwin (или MinGW)

на 'CMake исполняемый файл' выберите 'используйте комплект CMake x.X. x' (3.3.2 в моем случае на момент написания этого ответа)

'Debugger' показали мне говорит 'Cygwin GDB GNU gdb (GDB) 7.8' [слишком много gdb в этой строке ;-)]

ниже есть галочка для всех категорий и также должен отображаться правильный путь к 'make', 'C compiler' и 'компилятор C++'

  1. теперь переходим к 'Run' - > 'Edit configuration'. Вы должны увидеть свое имя проекта на левой боковой панели и конфигурации справа сторона

в окне консоли не должно быть ошибок. Вы увидите, что 'Run' - > 'Build' сейчас

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

надеюсь, что это помогает! Удачи и наслаждайтесь CLion.

Я встретил некоторые проблемы в Clion и, наконец, я решил их. Вот некоторый опыт.

  1. скачать и установить MinGW
  2. пакет G++ и gcc должен быть установлен по умолчанию. Используйте менеджер установки MinGW для установки mingw32-libz и mingw32-make. Вы можете открыть MinGW installation manager через C:\MinGW\libexec\mingw-get - . exe этот шаг является самым важным шагом. Если Clion не может найти make, компилятор C и Компилятор C++, перепроверьте менеджер установки MinGW, чтобы сделать каждый необходимый пакет установлен.
  3. в Clion, открыть файл->настройки->сборки,выполнения,развертывания->наборы. Установите MinGW home в качестве локального файла MinGW.
  4. Начните свой "Привет Мир"!

вы также можете использовать компилятор Microsoft Visual Studio вместо Cygwin или MinGW в среде Windows в качестве компилятора для CLion.

просто перейдите, чтобы найти действия в справке и введите "реестр" без " и включите CLion.включить.индекса MSVC Теперь настройте toolchain с помощью компилятора Microsoft Visual Studio. (Вам нужно скачать его, если он еще не загружен)

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