Ubuntu 14.04下安裝Golang以及LiteIDE

來源:互聯網
上載者:User
這是一個建立於 的文章,其中的資訊可能已經有所發展或是發生改變。

安裝配置Golang

  • 可以從Golang中國這裡下載,下載好後使用sudo tar -xvzf ~/Downloads/go*.linux-amd64.tar.gz -C /usr/local/命令將其解壓到/usr/local/位置,然後配置環境變數。
  • 使用命令vim ~/.bashrc開啟.bashrc檔案,然後在最後追加下面內容:

    export GOROOT=/usr/local/go
    export PATH=$PATH:$GOROOT/bin
    export GOPATH=~/Go

  • 然後使用命令source ~/.bashrc使其生效,需要注意的是,GOPATH這個環境變數指的是之後需要存放源碼的目錄,我使用的是~/Go目錄

  • 使用go version以及go env等命令來查看是否正確安裝Go

安裝配置LiteIDE

  • 可以從Golang中國這裡下載,然後將其解壓到某個目錄,這裡我是解壓到了/usr/local/目錄,然後在該目錄下,就可以看到liteide目錄了
  • 然後執行命令gksudo gedit /usr/share/applications/liteide.desktop,如果沒安裝gksu,首先根據提示安裝即可
  • 然後講下面的內容寫到建立的liteide.desktop檔案中:

    [Desktop Entry]
    Name=liteIDE
    Encoding=UTF-8
    Type=Application
    Exec=/usr/local/liteide/bin/liteide
    Terminal=false
    Icon=/usr/local/liteide/share/liteide/welcome/images/liteide400.png
    Comment=Integrated Development Environment
    StartupNotify=true
    Categories=Development;IDE;
    Name[en]=liteIDE

  • 然後我們就可以搜尋到LiteIDE了,將其固定到案頭,開啟之後在選項中修改LiteEnv的linux64以及linux64-local這兩個檔案,將其中的GOROOT修改為/usr/local/go

  • 這樣就完成了LiteIDE的安裝配置了

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.