星空网 > 软件开发 > 操作系统

CentOS 7.1下安装dotnet core

.NET CORE的官方(http://dotnet.github.io/getting-started/)只提供了Windows, Ubuntu14.04, 及Docker(也是基于Ubuntu14.04做的Image). 但鉴于微软已经把RedHat做为参考平台而且用Ubuntu14.04做Server我心里还是没底的. 所以想着在CentOS下配置.NET CORE的环境

开始我也是走的编译源码的路线,然后....搞编译环境实在是不是我强项,难道木有简单无脑的办法,我是个懒人

忽然的灵感是ubuntu,mac下打印的信息是

.NET Command Line Tools (1.0.0-beta-001598)

于是在github在找这个项目(https://github.com/dotnet/cli), 找到这个项目后一看README,宾果,我想要的包找到了.

可以下载最新的包:https://dotnetcli.blob.core.windows.net/dotnet/beta/Binaries/Latest/dotnet-centos-x64.latest.tar.gz

但是因为官网上ubuntu及docker等等推荐的都是1.0.0.001598这个版本号,尴尬癌... 好吧, 试了一下

https://dotnetcli.blob.core.windows.net/dotnet/beta/Binaries/1.0.0.001598/dotnet-centos-x64.1.0.0.001598.tar.gz

成功了.

于是可以开始了.

1. virtualbox 安装最小化的centos7.1, 安装wget

2. 安装.NET CORE

  1). #:cd ~

  2). #:mkdir dotnet

  3). #:cd dotnet

  2). #:wget https://dotnetcli.blob.core.windows.net/dotnet/beta/Binaries/1.0.0.001598/dotnet-centos-x64.1.0.0.001598.tar.gz

  3). #:tar -zxf dotnet-centos-x64.1.0.0.001598.tar.gz

3.  测试、运行:

接上面步骤

  1). #:cd bin

  2). #:./dotnet

提示错误:

Failed to load /root/dotnet/bin/libcoreclr.so, error: libunwind.so.8: cannot open shared object file: No such file or directory

  fix: yum install libunwind

  3). #:./dotnet

Failed to initialize CoreCLR, HRESULT: 0x80131500

  fix: yum install icu  (别问我为什么知道,嘿嘿)

  4). #:./dotnet

CentOS 7.1下安装dotnet coreimages/loading.gif' data-original="http://images2015.cnblogs.com/blog/40347/201604/40347-20160408165036640-1312979515.png" width="526" height="277" />

4. 配置环境变量

  1). #:vi /etc/profile

  在最后面添加

PATH=~/dotnet/bin:$PATH
export PATH

  2). #:source /etc/profile

 

现在可以和ubuntu, mac, docker下一样使用.net core编译、运行,发布你的项目啦

玩.NET CORE, 现在会遇到各种各样的问题如MySql的provider, Redis的Provider... 在没有官方版的情况下只能自己改或完全重写了




原标题:CentOS 7.1下安装dotnet core

关键词:Centos

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

赶跟卖邮件:https://www.goluckyvip.com/tag/4372.html
西班牙税务局:https://www.goluckyvip.com/tag/43730.html
西班牙铁路fba:https://www.goluckyvip.com/tag/43731.html
西班牙物流:https://www.goluckyvip.com/tag/43732.html
西班牙物流专线:https://www.goluckyvip.com/tag/43733.html
西班牙小包:https://www.goluckyvip.com/tag/43734.html
武陵山大裂谷周围景点 武陵山大裂谷周围景点图片:https://www.vstour.cn/a/411233.html
南美旅游报价(探索南美洲的旅行费用):https://www.vstour.cn/a/411234.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流