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

от admin

Install CLion

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.14 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 17.

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

Toolchain requirements

When using bundled MinGW, no additional tools are required

In case of Cygwin, install the version 2.8 or later with the gcc-g++ and gdb packages

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

In case of using WSL: Windows 10 Fall Creators Update (least version 1709, build 16299.15) and the tools required in WSL (see the Linux tab)

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

the make utility (run sudo apt-get -y install make to install it)

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 you want to install.

To install a specific version, click and select Available versions .

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 you want to install.

To install a specific version, click and select Available versions .

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.

After you run the Toolbox App for the first time, it will automatically add the Toolbox App icon to the main menu.

Select the product that you want to install.

To install a specific version, click and select Available versions .

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.

If you installed CLion via the Toolbox App, you can find the installation directory in the app: open the settings of the IDE instance in the Toolbox App, expand Configuration and look for the Install location field.

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.

There is a separate installer for ARM64 processors.

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, you can take several steps 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:

Silent configuration file

You can download the default silent configuration file for CLion at https://download.jetbrains.com/cpp/silent.config

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.

How to Install Jetbrains CLion on Ubuntu

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

Downloading CLion:

To download CLion, visit the official website of JetBrains at https://www.jetbrains.com from your favorite web browser and go to Tools > CLion.

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.

Читать:
Как увеличить размер поля в access

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.

How to Install Jetbrains CLion IDE on Ubuntu 20.04

How to Install Jetbrains CLion IDE on Ubuntu 20.04

CLion is a fully Integrated Development Environment(IDE) for coding in C and C++ on Microsoft Windows, Linux, and macOS.

It’s packed with an in-depth code analyzer, a range of code generation options, and the ability to navigate to anywhere in your code in one click.

CLion understands modern C++ standards and provides preprocessor support. It also integrates with GDB/LLDB and a set of unit testing frameworks.

It will enhance your productivity with a smart editor, code quality assurance, automated refactorings and deep integration with the CMake build system.

CLion is designed for native cross-platform development in C and C++, as well as Kotlin/Native, Rust and Swift. It also provides essential support for CMake language, Python, popular web technologies (like JavaScript, XML, HTML, Markdown and others), and this also includes support for all the other languages that are available through bundled and repository plugins.

Table of Contents

Key Features of CLion IDE:

  • Navigation & Search: Find your way through the code with instant navigation to a symbol, class or file. Inspect the calls or types hierarchy and easily search everywhere for nearly everything including IDE settings.
  • Run and Debug: Build, Run and Debug your application and unit tests locally or remotely in CLion. Use the debugger UI with GDB or LLDB as a backend.
  • Access the command line through the built-in terminal, switch on Vim-emulation mode together with the Vim key bindings, or expand the IDE’s functionality with other various plugins.
  • Select one of the default editor themes or customize them to match your personal preferences. Adopt the keyboard-centric approach and select a keymap you prefer the most, or create your own easily.
  • Smart editor: With an IDE that analyzes the context and understands your project, you can code faster than you think. Try smart completion, formatting and helpful views with code insight.
  • Code documentation: With CLion keep your code documented with ease.
  • Write beautiful and correct code with CLion. Static analysis for all supported languages highlights warnings and errors in the code immediately as you type and suggests quick-fixes.
  • Many more…

Refer official documentation for more information.

Basic system requirements for CLion:

These are the minimum system requirements for installing CLion on a Linux System.

  • RAM: 2 GB of Free RAM minimum, 8 GB of total system RAM (Recommended)
  • CPU: Any modern CPU, Multi-core CPU. CLion supports multithreading for different operations and processes making it faster the more CPU cores it can use.
  • Disk space: 2.5 GB and another 1 GB for caches, SSD drive with at least 5 GB of free space (Recommended).
  • Monitor resolution: 1024×768, 1920×1080 (Recommended)
  • GNOME or KDE desktop

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

But if necessary you can follow the below steps to install Java:

Installing Java

Type the following command to check whether Java is already installed on your system.

You can skip this step if Java is already installed, and if Java is not installed then follow the steps below.

In this tutorial I will install OpenJDK 11 and the installation is pretty straightforward.

First update the package index and then Install the OpenJDK 11 package by typing the following command.

This article explains two methods of installing CLion IDE on Ubuntu 20.04.

Choose the installation method that is most appropriate for your environment.

Method 1: Installing CLion as a Snap Package

The easiest way to install CLion on Ubuntu 20.04 is by using the snap packaging system.

CLion snap package is distributed and maintained by JetBrain.

A snap package is a type of universal Linux package that you can enjoy irrespective of the distro. Its an self-contained software packages that include the binary all dependencies needed to run the application.

All you need is the snap service pre-configured, In the case of Ubuntu 20.04, it comes with snap pre-installed.

If snapd package is not already installed then you can install it by running following command.

Note: Snap packages can be installed from either the command-line or via the Ubuntu Software application.

This is actually the Snap version of the CLion. It can be used on any Linux distribution that has Snap support.

Open your terminal ( Ctrl+Alt+T ) and type the following command to install the CLion IDE package.

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

That’s It. Now you can open the CLion application with the help of Activities search bar.

Method 2: Installing CLion IDE from Source

Compiling CLion IDE from the source allows you to install the latest CLion version. Follow the following steps to install CLion using the source code method.

Step #1

Open a terminal ( CTRL+ALT+T ) and execute the below commands to update packages.

Step #2

Download the latest CLion source code package from the official website. You can do so using wget Command.

Or visit official website and download from there.

Step #3

Once the download is complete extract the .tar.gz file with the help of tar command .

Extract the tarball to a directory that supports file execution.

For example, to extract it to the recommended /opt directory, run the following command:

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

Step #4

Execute the clion.sh from bin/ subdirectory to run CLion.

As soon as you run the script the CLion application will start.

At this step, you have successfully installed CLion IDE application on Ubuntu 20.04 system.

To create a desktop entry of the application: From the main menu of IDE, click Tools -> Create Desktop Entry .

Starting CLion

You can launch the CLion IDE application with the help of the Launcher icon created on the desktop.

OR run the clion.sh shell script in the installation directory under bin/ .

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.

1. Select the user interface theme:

Select whether you want to use the default Darcula or Light theme.

Image Credit: jetbrains.com

2. Download and install additional plugins

If necessary, click Plugins in the left-hand pane and download and install additional plugins from the CLion plugins repository.

Image Credit: jetbrains.com

3. Configure toolchains

Next, you will be prompted to configure the toolchains. A toolchain is a set of the necessary tools required for building and running your application.

If there are toolchains already installed on your machine, CLion will automatically detect them.

You will always be able to configure the toolchains later in the Settings / Preferences | Build, Execution, Deployment | Toolchain dialog.

Image Credit: jetbrains.com

Start a project in CLion

Click Start using CLion, and you will see the Welcome screen. From there, you can do the following:

  • Create a new project
  • Open an existing project or file
  • Check out an existing project from a version control system

It is also possible to drag an existing project directory or a separate file to the Welcome screen and open it in CLion.

Image Credit: jetbrains.com

How to Uninstall CLion from Ubuntu 20.04

For some reason, If you want to uninstall CLion IDE application, refer following steps.

Step #1

Delete the installation directory.

Step #2

Remove following directories.

Conclusion

I hope that now you have a good understanding of How to Install Jetbrains CLion IDE on Ubuntu 20.04 LTS Focal Fossa.

If anyone does have any questions about what we covered in this guide then feel free to ask in the comment section below and I will do my best to answer those.

Как установить JetBrains CLion в Linux

JetBrains Clion — это кроссплатформенная IDE (интегрированная среда разработки) для языков программирования C и C ++. Он предлагает множество ценных функций, таких как генерация кода, анализ кода и т. Д.

В этом руководстве мы рассмотрим различные способы установки JetBrains CLion IDE в Linux. Для получения дополнительной информации о приложении щелкните здесь.

Установка пакета Snap

JetBrains CLion доступен в виде пакета Snap для тех, кто любит использовать Ubuntu Snap Store. Чтобы использовать CLion в качестве Snap, у вас должна быть настроена и установлена ​​среда выполнения Snapd в вашей системе Linux.

Если вы используете Ubuntu, среда выполнения Snapd уже готова к работе. Однако, если вы используете Fedora, OpenSUSE, Arch Linux или что-то еще, вам необходимо заранее установить среду выполнения.

Настроить среду выполнения Snapd в Linux, чтобы вы могли устанавливать пакеты Snap, относительно просто. Для начала установите пакет «snapd» с помощью диспетчера пакетов вашей ОС Linux. После этого используйте Systemd, чтобы включить файл «snapd.socket».

Не можете понять, как настроить среду выполнения Snapd на вашем ПК с Linux? Это нормально! Мы можем помочь! Следуйте нашему подробному руководству о том, как настроить пакеты Snap, чтобы заставить его работать.

После настройки Snaps вы сможете быстро установить приложение JetBrains CLion на свой компьютер с Linux с помощью следующей команды мгновенной установки ниже.

Имейте в виду, что CLion устанавливается как Snap в «Классическом режиме». Для классического режима требуется AppArmor, и не каждая операционная система Linux поддерживает его. Если Snap сообщает вам, что вы не можете установить его правильно, попробуйте вместо этого инструкции по установке Flatpak.

Установка Flatpak

JetBrains CLion доступен как Flatpak в магазине приложений Flathub. Если вы хотите установить эту программу как Flatpak в вашей ОС Linux, вам сначала необходимо настроить среду выполнения Flatpak.

Настроить среду выполнения Flatpak в Linux очень просто. Для этого вам нужно только установить пакет «flatpak» в вашу систему с помощью менеджера пакетов. Если вам нужна помощь в настройке Flatpak на вашем ПК с Linux, следуйте нашему руководству по этому вопросу.

После того, как среда выполнения Flatpak запущена, следующим шагом будет включение магазина приложений Flathub. Flathub содержит пакет JetBrains CLion, поэтому этот шаг очень важен. Чтобы включить Flathub, используйте следующую команду удаленного добавления flatpak ниже.

Настроив магазин приложений Flathub, вы сможете установить CLion на свой компьютер с Linux. Используя приведенную ниже команду установки flatpak, заставьте приложение работать на вашем компьютере.

Установка Arch Linux

Как и все приложения JetBrains, для CLion доступен для установки пакет AUR. Имейте в виду, что эти пакеты, хотя и хороши, не получают официальной поддержки от JetBrains. Тем не менее, пакет CLion AUR загружается непосредственно с их веб-сайта, поэтому он не использует какой-либо модифицированный код.

Чтобы начать установку CLion в Arch Linux, вам необходимо установить пакеты «Git» и «Base-devel». Эти пакеты необходимы для взаимодействия с AUR.

После установки двух пакетов вы должны установить помощник Trizen AUR. Эта программа автоматизирует установку CLion, поэтому вам не придется делать все вручную.

Чтобы установить Trizen, последовательно введите следующие команды.

Наконец, установите JetBrains CLion на свой компьютер с Arch Linux, используя команду trizen -S.

Стандартная установка Linux

JetBrains CLion поставляется с универсальным установщиком для тех, кто в Linux не хочет использовать Snaps или Flatpak и не использует Arch Linux. Чтобы начать установку, перейдите на страницу загрузки CLion и нажмите синюю кнопку «Загрузить».

После загрузки используйте команду CD, чтобы переместить окно терминала в каталог «Загрузки». Затем с помощью команды tar распакуйте ранее загруженный файл JetBrains CLion TarGZ.

Внутри каталога «Downloads» используйте команду tar xvf, чтобы распаковать файл CLion TarGZ. Процесс распаковки должен занять всего пару секунд, так как файл не такой большой.

Когда процесс будет завершен, используйте команду CD, чтобы перейти в новую папку CLion, созданную командой tar после процесса распаковки.

Похожие статьи