CentosProgramming

How to install Swift Programming Language on CentOS 8

Swift is a powerful and intuitive programming language for iOS, iPadOS, macOS, tvOS, and watchOS. Writing Swift code is interactive and fun, the syntax is concise yet expressive, and Swift includes modern features developers love. Swift code is safe by design, yet also produces software that runs lightning-fast.
In this guide We will show you 2 methods to install Swift programming language on CentOS 8 / RHEL 8.

Installation of Swift programming Language on CentOS 8

Using the following two different methods, a swift computer programming language can install on CentOS 8 system:

1. Install Swift Programming Language using yum repository

Before installing swift, several dependencies must be installed on the CentOS 8 system. As a result, by running the command below, these needed packages will be installed automatically on your system:

# sudo yum install swift-lang

After running the above-given command, all required dependent packages will install automatically on the system. Press ‘y’ and then hit ‘Enter’ to install all required dependencies.

Swift install using YUM command
Swift install using YUM command

The installation of swift will complete in several minutes on the system.
Once the installation of Swift is completed, check the installed version by using the below-given command:

# sudo swift -version

2. Install Swift Programming Language Using Snap

An alternative method is also available for the Swift language installation on CentOS 8. Using a snap application, you can install swift on your system. So, install the snapd by executing the command, which is mentioned below:

# sudo yum install snapd

Now, enable the snapd by executing the below-mentioned command:

# sudo systemctl enable --now snapd.socket

Create symbolic link of snap by using the following command:

# sudo ln -s /var/lib/snapd/snap /snap
Now, install swift-lang via snap by executing the below-mentioned command:

# sudo snap install swift-lang --edge

Conclusion

Congratulations! You have successfully installed Swift. Thanks for using this tutorial for installing the Swift Programming Language on CentOS 8 systems. For additional help or useful information, we recommend you check the official Swift website.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

CAPTCHA


This site uses Akismet to reduce spam. Learn how your comment data is processed.

Check Also
Close
Back to top button