首页 > 系统相关 >ubuntu搭建swift开发环境

ubuntu搭建swift开发环境

时间:2024-03-07 09:46:06浏览次数:34  
标签:git edu https ubuntu brew homebrew tuna swift 搭建

ubuntu搭建swift开发环境

  1. 安装homebrew:https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/
  2. 通过homebrew安装swift

安装homebrew

新建setup_homebrew_env.sh

#!/bin/bash

export HOMEBREW_INSTALL_FROM_API=1
export HOMEBREW_API_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/api"
export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles"
export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git"
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"

新建install_homebrew.sh

#!/bin/bash

# 从本镜像下载安装脚本并安装 Homebrew / Linuxbrew
git clone --depth=1 https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/install.git brew-install
/bin/bash brew-install/install.sh
rm -rf brew-install

test -d ~/.linuxbrew && eval "$(~/.linuxbrew/bin/brew shellenv)"
test -d /home/linuxbrew/.linuxbrew && eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
test -r ~/.bash_profile && echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >>~/.bash_profile
test -r ~/.profile && echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >>~/.profile
test -r ~/.zprofile && echo "eval \"\$($(brew --prefix)/bin/brew shellenv)\"" >>~/.zprofile

# ==> Next steps:
# - Run these two commands in your terminal to add Homebrew to your PATH:
(
    echo
    echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"'
) >>/home/sada/.bashrc
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
# - Run these commands in your terminal to add the non-default Git remotes for Homebrew/brew and Homebrew/homebrew-core:
echo '# Set PATH, MANPATH, etc., for Homebrew.' >>/home/sada/.bashrc
echo 'export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git"' >>/home/sada/.bashrc
echo 'export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"' >>/home/sada/.bashrc
export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git"
export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"
# - Install Homebrew's dependencies if you have sudo access:
sudo apt-get install build-essential
#   For more information, see:
# https://docs.brew.sh/Homebrew-on-Linux
# - We recommend that you install GCC:
# brew install gcc
# - Run brew help to get started
# - Further documentation:
# https://docs.brew.sh

进行安装

# 加载环境变量至当前终端,建议提前设置魔法
source setup_homebrew_env.sh

# 运行安装脚本
bahs install_homebrew.sh

参考资料

清华tuna Homebrew镜像源

标签:git,edu,https,ubuntu,brew,homebrew,tuna,swift,搭建
From: https://www.cnblogs.com/Biiigwang/p/18058181/ubuntu-builds-the-swift-development-environme

相关文章

  • ubuntu安装redis7
    1、下载redis安装包,放到目录/opt下面2、opt下面解压redis,并进入目录3、在目录下面执行make命令 和makeinstall名称  出现maketest代表安装成功,安装目录在 /usr/local/bin下面4、在根目录下面创建目录 /myredis,并将redis安装包目录(/opt/redis)下面的redis.conf......
  • Ubuntu安装zabbix配置教程
    Ubuntu镜像下载:https://mirrors.aliyun.com/ubuntu-releases/20.04.6/ubuntu-20.04.6-live-server-amd64.isoUbuntu在vm虚拟机安装(如下未提及项均保持默认选项)1、配置软件源为阿里云,http://mirrors.aliyun.com/ubuntu 2、配置服务器名称和用户名密码 3、安装ssh服务,......
  • 从零开始搭建Springboot开发环境(Java8+Git+Maven+MySQL+Idea)之一步到位
    说明所谓万事开头难,对于初学Java和Springboot框架的小伙伴往往会花不少时间在开发环境搭建上面。究其原因其实还是不熟悉,作为在IT界摸爬滚打数年的老司机,对于各种开发环境搭建已经了然于胸,自己当年也是这么过来的。今天我就毕其功于一役,解放大家的时间,让凡人的环境配置见鬼去吧......
  • vim-common (= 2:7.4.1689-3ubuntu1.5) 但是 2:8.1.0320-1ubuntu3 正要被安装
    安装失败提示(普通用户)~$sudoapt-getinstallvim…下列软件包有未满足的依赖关系:vim:依赖:vim-common(=2:7.4.1689-3ubuntu1.5)但是2:8.1.0320-1ubuntu3正要被安装依赖:libpython3.5(>=3.5.0~b1)但是它将不会被安装依赖:libtinfo5(>=6)但是它将不会被安装解......
  • WEBRTC 局域网 自己搭建信令服务 实现视频通讯
    信令服务constapp=require('express')();constwsInstance=require('express-ws')(app);app.ws('/',ws=>{ ws.on('message',data=>{ wsInstance.getWss().clients.forEach(server=>{ if(server!==ws)......
  • 本地快速搭建airflow docker镜像,映射本地路径
    airflow官方文档拉取镜像dockerpullapache/airflow:2.8.2拉取配置文件curl-LfO'https://airflow.apache.org/docs/apache-airflow/2.8.2/docker-compose.yaml'修改刚刚拉取的yaml文件关闭示例dagAIRFLOW__CORE__LOAD_EXAMPLES:'false'映射本地路径volumes:......
  • qgis 3.30 python开发环境搭建
     1.使用mamba加速conda下载qgiscondainstall-cconda-forge-nbasemamba2.创建qgis虚拟环境condacreate-nqgispython=3.11condaactivateqgis(管理员CMD)mambainstall-cconda-forgeqgis=3.30.0mambainstall-cconda-forgerasteriomambainstall-cco......
  • Jmeter+Influxdb+Grafana搭建
    背景在无界面压测情况下,我们需要去额外搭建可视化观测平台。借助于Influxdb+Grafana,我们可以轻松让Jmeter的结果自动写入Influxdb,Influxdb实时存储运行结果,最后由Grafana作为展示Jmeter无界面运行需要修改配置(jmeter.properties)jmeter.save.saveservice.response_data=truej......
  • win11搭建nginx+php环境
    win11搭建nginx+php环境nginx配置nginx-1.24.0/nginx.conf#passthePHPscriptstoFastCGIserverlisteningon127.0.0.1:9000#location~\.php${roothtml;fastcgi_pass127.0.0.1:9000;fastcg......
  • Ubuntu22.04中的LibreOffice如何设置中文
    LibreOffice版本Version:7.3.7.2/LibreOfficeCommunityBuildID:30(Build:2)设置方法打开LibreOffice,进入软件的操作界面中。在工具栏中点击Tools,然后在下拉选项中找到Options进入到设置的界面。在Options的页面中,找到Language的选项。这个选项就是语言设置。......