openSUSE

How To Install GCC on openSUSE

Install GCC on openSUSE

In this tutorial, we will show you how to install GCC on openSUSE.  The GNU Compiler Collection (GCC) stands as a cornerstone in the realm of software development, offering a versatile suite of compilers that support languages such as C, C++, and Fortran. Originating as the compiler for the GNU operating system, GCC has evolved to support a wide array of programming languages and operating systems, including openSUSE, a robust and flexible Linux distribution.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you the step-by-step installation of the GCC Compiler on openSUSE.

Prerequisites

  • A server running one of the following operating systems: openSUSE.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • You will need access to the terminal to execute commands. openSUSE provides the Terminal application for this purpose. It can be found in your Applications menu.
  • You’ll need an active internet connection to download GCC and its dependencies.
  • You’ll need administrative (root) access or a user account with sudo privileges.

Install GCC on openSUSE

Step 1. Before we begin the installation process, it’s important to ensure that your system is up-to-date. You can do this by running the following command in your terminal:

sudo zypper refresh
sudo zypper update

Next, enabling the Open Source Software (OSS) repository is necessary for accessing the GCC packages. This can be done through the YaST software management tool or directly via the CLI with the following command:

sudo zypper addrepo http://download.opensuse.org/distribution/leap/15.6/repo/oss/ oss

Step 2. Installing GNU Compiler Collection (GCC) on openSUSE.

With your system prepared, you can proceed to search for available GCC packages. This is done with the zypper search command, which lists all the GCC-related packages available for installation:

zypper search gcc

To install the GCC compiler, use the following command:

sudo zypper install gcc

For developers looking to compile C++ programs, installing the gcc-c++ the package is necessary:

sudo zypper install gcc-c++

After installation, verifying that GCC is correctly installed on your system is a good practice. You can check the installed version of GCC and G++ (the GNU C++ compiler) with:

gcc --version
g++ --version

Congratulations! You have successfully installed GCC. Thanks for using this tutorial for installing the GCC (GNU Compiler Collection) on your openSUSE system. For additional or useful information, we recommend you check the official GCC website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is a seasoned Linux system administrator with a wealth of experience in the field. Known for his contributions to idroot.us, r00t has authored numerous tutorials and guides, helping users navigate the complexities of Linux systems. His expertise spans across various Linux distributions, including Ubuntu, CentOS, and Debian. r00t's work is characterized by his ability to simplify complex concepts, making Linux more accessible to users of all skill levels. His dedication to the Linux community and his commitment to sharing knowledge makes him a respected figure in the field.
Back to top button