在Linux上編譯dotnet cli的原始碼產生.NET Core SDK的安裝包

來源:互聯網
上載者:User

標籤:review   win   packages   get   14.04   build   amd   install   erro   

.NET 的開源,有了更多的DIY樂趣。這篇博文記錄一下在新安裝的 Linux Ubuntu 14.04 上通過自己動手編譯 dotnet cli 的原始碼產生 .net core sdk 的 deb 安裝包。

1)安裝一個現有版本的 .net core sdk

sudo sh -c ‘echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet-release/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list‘sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 417A0893sudo apt-get updateapt-get install dotnet-dev-1.0.0-preview2.1-003177

如果不安裝,build時會出現下面的錯誤

dotnet_install: Error: Unable to locate libunwind. Install libunwind to continuedotnet_install: Error: Unable to locate libicu. Install libicu to continue

2)從 github 上籤出 dotnet cli 的原始碼

apt-get install gitgit clone https://github.com/dotnet/cli.git

3)安裝相依元件 liblldb, devscripts, debhelper

apt-get install liblldb-3.6apt-get install devscriptsapt-get install debhelperapt-get install curl

4)運行 build 命令 

./build.sh /t:compile

5)build 成功後的輸出結果 

~/cli/artifacts/ubuntu.14.04-x64/packages# lsdotnet-host-ubuntu-x64.1.0.1.debdotnet-hostfxr-ubuntu-x64.1.0.1.debdotnet-sharedframework-ubuntu-x64.1.0.1.deb

註:在 build 時可通過 init-microsoft.dotnet.buildtools.log 記錄檔查看 build 進度。

在Linux上編譯dotnet cli的原始碼產生.NET Core SDK的安裝包

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.