美文网首页Swift Server
Swift Ubuntu上配置运行环境

Swift Ubuntu上配置运行环境

作者: OneByte | 来源:发表于2018-01-18 16:20 被阅读153次

1.购买Ubuntu

vultr上有活动,绑定信用卡有送$10美元,并且vps价格低(最低$2.5一个月)、性价比高:

服务器区域.png
价格.png

2.配置Swift环境

获取地址.png

右键->获取链接地址
wget https://swift.org/builds/swift-4.0.3-release/ubuntu1604/swift-4.0.3-RELEASE/swift-4.0.3-RELEASE-ubuntu16.04.tar.gz

  • 解压

sudo tar xzf swift-4.0.3-RELEASE-ubuntu16.04.tar.gz

  • 安装Clang

sudo apt-get install clang

  • 设置环境变量

echo "export PATH=~/swift-4.0.3-RELEASE-ubuntu16.04/usr/bin:"${PATH}"" >> ~/.profile
source ~/.profile

  • 验证是否正确

1.$ swift --version
输出:
$Swift version 4.0.3 (swift-4.0.3-RELEASE)
Target: x86_64-unknown-linux-gnu
2.$ swift

3.错误提示修复

  • usr/bin/swift-build: error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory

sudo apt-get install libcurl

  • usr/bin/lldb: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory

sudo apt-get install libpython2.7

相关文章

  • Swift Ubuntu上配置运行环境

    1.购买Ubuntu vultr上有活动,绑定信用卡有送$10美元,并且vps价格低(最低$2.5一个月)、性价比...

  • ubuntu安装golang

    Ubuntu安装goland ubuntu 本身就支持 golang 命令行安装 配置运行环境 打开bashrc:...

  • lnmp配置laravel环境

    Ubuntu环境下配置laravel运行环境 一、实现过程的参考信息 http://blog.csdn.net/s...

  • lnmp配置php环境

    Ubuntu16.04环境下配置php运行环境lnmp** 一、实现过程参考信息如下: Lnmp社区: https...

  • Vapor视频教程 - Building a Pokédex w

    简介 Vapor 是基于 Swift 实现的 Web 框架与服务,可运行于 macOS 和 Ubuntu 系统上。...

  • Vapor系列教程 - 介绍

    Vapor 是基于 Swift 实现的 Web 框架与服务,可运行于 macOS 和 Ubuntu 系统上。 特性...

  • Fastdfs的安装部署配置

    linux 运维:安装+部署+配置 安装:编译安装部署:涉及到权限问题配置:见招拆招 运行环境:Ubuntu 16...

  • 2020-04-03

    Ubuntu19.10 上的Latex 环境配置( TexLive + Texstudio + Languag...

  • Python-for-Android安装笔记

    目标: 在Ubuntu上配置Android打包环境 环境配置: Python使用2.7的,尽量不要用3,否则会出现...

  • Vapor介绍 - 附中文版文档

    Vapor 是基于 Swift 实现的 Web 框架与服务,可运行于 OS X 和 Ubuntu 系统上。 特性 ...

网友评论

    本文标题:Swift Ubuntu上配置运行环境

    本文链接:https://www.haomeiwen.com/subject/ooywoxtx.html