How to install the Swift programming language on CentOS 8

s2 0

Swift is a modern, general purpose, open source, and powerful compiled programming language. It was developed by Apple for iOS application development and released in 2014. However, it can also be used for cloud services, system programming and the design of other applications. The Swift language is used as a replacement for the older language such as Objective-C. Compared to Python, users can easily learn and understand the Swift programming language. It is more secure, easier to use, performs well, and allows users to write secure but rigorous code. In this article, we are going to show you 2 methods to install the Swift programming language on CentOS 8.

If you want to install the Swift language on the Ubuntu 20.04 distribution, you can install Swift on Ubuntu 20.04 from this link.

requirements

Use sudo privileges or an administrator root account to install the fast programming language on CentOS 8.

Installation of the Swift programming language on CentOS 8

There are two different methods that can be used to install a fast computer programming language on the CentOS 8 system:

Method 1: install the Swift programming language using the Yum repository

There are several dependencies that need to be installed on the CentOS 8 system before installing Swift. As a result, these required packages will be automatically installed on your system by running the following command:

$ sudo yum install swift-lang

After running the above command, any required dependent packages will be automatically installed on the system. Press ‘y’ then press ‘Enter’ to install all required dependencies.

The installation of Swift on the system is completed in a few minutes.

Check the installed Swift version

Once the Swift installation is complete, check the installed version using the command given below:

$ sudo swift -version

The installed Swift version is displayed in the terminal window as follows:

Check the quick version

Use Swift on CentOS 8

Start the fast programming language by displaying a message in the terminal window. Run the below mentioned command:advertising

$ fast

Check if the swift is installed and properly works on your system, display the following message on the terminal screen using the print statement as follows:
> print(“Welcome to the LinuxWays: How to install swift on CentOS 8”)

You should see the following output on the terminal:

Try Swift

Method 2: install the Swift programming language using Snap

An alternate method is also available for Swift voice installation on CentOS 8. You can use a Snap application to install Swift on your system. So install snapd by running the command below:

$ sudo yum install snapd

Install Snapd

Now activate the snapd by running the below mentioned command:

$ sudo systemctl enable --now snapd.socket

Activate Snapd

Create a symbolic link to the catch using the following command:

$ sudo ln -s /var/lib/snapd/snap /snap

Now install Swift-lang via snap by running the command below:

$ sudo snap install swift-lang --edge

diploma

The installation of the Swift programming language on CentOS 8 is demonstrated in this article. We discussed two different methods: installing Swift from the Yum repository and installing Swift using the Snap application. Thanks very much! For installing Swift on your system. To learn more about the Swift programming language, visit theirs official Swift website.

How to install the Swift programming language on CentOS 8
Tags: