Installing
-
2. Installing Dependencies
Install the Required Package.
sudo yum install clang libicu-devel
Authenticate with the User Admin Pass.
If Got “User is Not in Sudoers file” then see: How to Enable sudo. -
3. Downloading Swift Compiler
Download Swift Release for CentOS
-
4. Extracting Swift Compiler
Double-Click on Archive and Extract into /tmp.
Or from Shell:
tar xvzf ~/Downloads/swift*tar.gz -C /tmp/
-
5. Installing Swift Compiler
Next Relocate the Swift stuff
With:sudo mv /tmp/swift* /opt/swift
And then Set the SuperUser as Owner:
chown -R root:root /opt/swift
Moreover, import the GPG Key:
wget -q -O - https://swift.org/keys/all-keys.asc | sudo gpg --import -
-
6. Setting up User’s Path
Now to Amend the User PATH
Simply run:echo 'export PATH=/opt/swift/usr/bin:$PATH' >> ~/.bashrc
ReLoad the PATH simply with:
bash
Contents