{"metadata":{"image":[],"title":"","description":""},"api":{"url":"","auth":"required","params":[],"results":{"codes":[]},"settings":"","examples":{"codes":[]}},"next":{"description":"","pages":[]},"title":"Install Swift 3: Ubuntu","type":"basic","slug":"install-on-ubuntu","excerpt":"","body":"To install Vapor, you just need to have Swift 3 installed.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Download\"\n}\n[/block]\nInstalling Swift on Linux only takes a few minutes and supports 14.04 and 15.10. Only the download section differs.\n[block:callout]\n{\n  \"type\": \"info\",\n  \"body\": \"If you work on multiple Swift 3 projects, you may want to follow \\\"Install Swift 3 (Swiftenv)\\\" instead.\",\n  \"title\": \"Swift Version Manager\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Download (14.04 - Trusty Tahr)\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"# Download Swift\\ncurl -O https://swift.org/builds/development/ubuntu1404/swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a/swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a-ubuntu14.04.tar.gz\\n\\n# Untar\\ntar -zxf swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a-ubuntu14.04.tar.gz\\n\\n# Rename\\nmv swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a-ubuntu14.04 swift\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Download (15.10 - Wily Werewolf)\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"# Download\\nwget https://swift.org/builds/development/ubuntu1510/swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a/swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a-ubuntu15.10.tar.gz\\n\\n# Untar\\ntar -zxf swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a-ubuntu15.10.tar.gz\\n\\n# Rename\\nmv swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a-ubuntu15.10 swift\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Install Dependencies\"\n}\n[/block]\nDepending on your flavor of Ubuntu, you may need to install some additional tools for the compiler. We'll err on the safe side and install everything you should need.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"sudo apt-get update\\nsudo apt-get install clang libicu-dev binutils git\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Install\"\n}\n[/block]\nThere are two methods to installing Swift. Either add it to your PATH, or move it into your bin.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"# Add to path\\necho \\\"export PATH=/path/to/swift/usr/bin:\\\\\\\"\\\\${PATH}\\\\\\\"\\\" >> ~/.bashrc\\n\\n# Reload path\\nsource ~/.bashrc\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Absolute Path\",\n  \"body\": \"Make sure to replace `/path/to/swift/` with an absolute path to your Swift installation.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Verify\"\n}\n[/block]\nCheck whether your installation worked.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"swift --version\\n\\n# Apple Swift version 3.0-dev (LLVM b010debd0e, Clang 3e4d01d89b, Swift 7182c58cb2)\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]","updates":[],"order":1,"isReference":false,"hidden":false,"sync_unique":"","link_url":"","link_external":false,"_id":"5768701b72cd4c0e000fad2a","githubsync":"","parentDoc":null,"__v":6,"project":"57086fe855a4690e005de407","version":{"version":"0.12","version_clean":"0.12.0","codename":"Client Clyde","is_stable":false,"is_beta":true,"is_hidden":false,"is_deprecated":true,"categories":["5768701b72cd4c0e000fad19","5768701b72cd4c0e000fad1a","5768701b72cd4c0e000fad1b","5768701b72cd4c0e000fad1c"],"_id":"5768701b72cd4c0e000fad18","releaseDate":"2016-06-20T22:37:15.641Z","__v":1,"createdAt":"2016-06-20T22:37:15.641Z","project":"57086fe855a4690e005de407"},"category":{"sync":{"isSync":false,"url":""},"pages":[],"title":"Getting Started","slug":"documentation","order":0,"from_sync":false,"reference":false,"_id":"5768701b72cd4c0e000fad19","createdAt":"2016-04-09T02:58:48.377Z","__v":0,"project":"57086fe855a4690e005de407","version":"5768701b72cd4c0e000fad18"},"createdAt":"2016-04-09T02:58:48.407Z","user":"57086f3d447c410e00221bd1"}

Install Swift 3: Ubuntu


To install Vapor, you just need to have Swift 3 installed. [block:api-header] { "type": "basic", "title": "Download" } [/block] Installing Swift on Linux only takes a few minutes and supports 14.04 and 15.10. Only the download section differs. [block:callout] { "type": "info", "body": "If you work on multiple Swift 3 projects, you may want to follow \"Install Swift 3 (Swiftenv)\" instead.", "title": "Swift Version Manager" } [/block] [block:api-header] { "type": "basic", "title": "Download (14.04 - Trusty Tahr)" } [/block] [block:code] { "codes": [ { "code": "# Download Swift\ncurl -O https://swift.org/builds/development/ubuntu1404/swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a/swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a-ubuntu14.04.tar.gz\n\n# Untar\ntar -zxf swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a-ubuntu14.04.tar.gz\n\n# Rename\nmv swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a-ubuntu14.04 swift", "language": "shell" } ] } [/block] [block:api-header] { "type": "basic", "title": "Download (15.10 - Wily Werewolf)" } [/block] [block:code] { "codes": [ { "code": "# Download\nwget https://swift.org/builds/development/ubuntu1510/swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a/swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a-ubuntu15.10.tar.gz\n\n# Untar\ntar -zxf swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a-ubuntu15.10.tar.gz\n\n# Rename\nmv swift-DEVELOPMENT-SNAPSHOT-2016-06-20-a-ubuntu15.10 swift", "language": "shell" } ] } [/block] [block:api-header] { "type": "basic", "title": "Install Dependencies" } [/block] Depending on your flavor of Ubuntu, you may need to install some additional tools for the compiler. We'll err on the safe side and install everything you should need. [block:code] { "codes": [ { "code": "sudo apt-get update\nsudo apt-get install clang libicu-dev binutils git", "language": "shell" } ] } [/block] [block:api-header] { "type": "basic", "title": "Install" } [/block] There are two methods to installing Swift. Either add it to your PATH, or move it into your bin. [block:code] { "codes": [ { "code": "# Add to path\necho \"export PATH=/path/to/swift/usr/bin:\\\"\\${PATH}\\\"\" >> ~/.bashrc\n\n# Reload path\nsource ~/.bashrc", "language": "shell" } ] } [/block] [block:callout] { "type": "warning", "title": "Absolute Path", "body": "Make sure to replace `/path/to/swift/` with an absolute path to your Swift installation." } [/block] [block:api-header] { "type": "basic", "title": "Verify" } [/block] Check whether your installation worked. [block:code] { "codes": [ { "code": "swift --version\n\n# Apple Swift version 3.0-dev (LLVM b010debd0e, Clang 3e4d01d89b, Swift 7182c58cb2)", "language": "shell" } ] } [/block]