简体   繁体   English

无法在Ubuntu中安装Swift

[英]Unable to install Swift in Ubuntu

Hi I am trying to install Swift on Ubuntu (Ubuntu 15.10). 嗨,我正在尝试在Ubuntu(Ubuntu 15.10)上安装Swift。 I followed the guide of Apple at swift.org . 我在swift.org上遵循了Apple的指南。 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 这是我的目录路径http://pastebin.com/Z1aNiDQM

Kindly help me to complete installation. 请帮助我完成安装。

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. 但这是错误的,因为它在路径中包含swift可执行文件本身。

It should be like this instead: 应该是这样的:

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

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 您可以尝试/usr/whereever/bin/swift

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM