HarshIT
HarshIT

Reputation: 4915

Unable to install Swift in Ubuntu

Hi I am trying to install Swift on Ubuntu (Ubuntu 15.10). I followed the guide of Apple at swift.org. But after executing all the steps when I execute following command

swift --version

It returns error saying

harshit@harshit-Linux:~/swift/usr/bin$ swift --versionThe program 'swift' can be found in the following packages:
 * python-swiftclient
 * python3-swiftclient
Try: sudo apt-get install <selected package>

I used

export PATH=/home/harshit/swift/usr/bin/swift:"${PATH}"

Here is my directory path http://pastebin.com/Z1aNiDQM

Kindly help me to complete installation.

Upvotes: 2

Views: 3957

Answers (2)

Eric Aya
Eric Aya

Reputation: 70098

You are declaring your path like this:

export PATH=/home/harshit/swift/usr/bin/swift:"${PATH}"

but it's wrong because it includes the swift executable itself in the path.

It should be like this instead:

export PATH=/home/harshit/swift/usr/bin:"${PATH}"

Upvotes: 5

Jeef
Jeef

Reputation: 27275

It sounds like you did not add swift to your path. Do you have the direct path to where it is installed? You could try /usr/whereever/bin/swift

Upvotes: 2

Related Questions