首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如果出现空参数异常,Kpm还原将失败。

如果出现空参数异常,Kpm还原将失败。
EN

Stack Overflow用户
提问于 2015-01-06 18:57:05
回答 1查看 377关注 0票数 1

我在CentOs 6、CentOs 7和Ubuntu 12.04上尝试了以下几种方法,结果都是一样的:

代码语言:javascript
复制
yum update -y
yum install  git wget unzip -y
yum install glib2-devel libpng-devel libjpeg-devel giflib-devel libtiff-devel libX11-devel fontconfig-devel bison gettext libtool cairo-devel gcc-c++ -y

cd /usr/local/src
git clone git://github.com/mono/mono.git
cd mono
./autogen.sh --prefix=/usr/local
sudo make get-monolite-latest
make EXTERNAL_MCS=${PWD}/mcs/class/lib/monolite/basic.exe 
make install

curl -sSL https://raw.githubusercontent.com/aspnet/Home/master/kvminstall.sh | sh && source ~/.kre/kvm/kvm.sh
chmod a+x /root/.kre/kvm/kvm.sh 
source /root/.kre/kvm/kvm.sh
kvm upgrade


CERTMGR=/usr/local/bin/certmgr
sudo $CERTMGR -ssl -m https://go.microsoft.com
sudo $CERTMGR -ssl -m https://nugetgallery.blob.core.windows.net
sudo $CERTMGR -ssl -m https://nuget.org
mozroots --import --sync

cd /usr/local/src
git clone https://github.com/aspnet/home
cd home/samples/HelloMvc/
kpm restore

我知道这个错误:

代码语言:javascript
复制
Restoring packages for ----------
System.ArgumentNullException: Argument cannot be null.
Parameter name: format
  at System.ParameterizedStrings.Evaluate (System.String format, FormatParam[] args) [0x00000] in <filename unknown>:0 
  at System.TermInfoDriver.ChangeColor (System.String format, ConsoleColor color) [0x00000] in <filename unknown>:0 
  at System.TermInfoDriver.set_ForegroundColor (ConsoleColor value) [0x00000] in <filename unknown>:0 
  at System.ConsoleDriver.set_ForegroundColor (ConsoleColor value) [0x00000] in <filename unknown>:0 
  at System.Console.set_ForegroundColor (ConsoleColor value) [0x00000] in <filename unknown>:0 
  at Microsoft.Framework.Runtime.Common.CommandLine.AnsiConsole.SetBold (Boolean bold) [0x00000] in <filename unknown>:0 
  at Microsoft.Framework.Runtime.Common.CommandLine.AnsiConsole.WriteLine (System.String message) [0x00000] in <filename unknown>:0 
  at Microsoft.Framework.PackageManager.Report.WriteLine (System.String message) [0x00000] in <filename unknown>:0 
  at Microsoft.Framework.PackageManager.RestoreCommand+<RestoreForProject>d__1.MoveNext () [0x00000] in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter`1[System.Boolean].GetResult () [0x00000] in <filename unknown>:0 
  at Microsoft.Framework.PackageManager.RestoreCommand+<ExecuteCommand>d__1.MoveNext () [0x00000] in <filename unknown>:0 
----------
Restore failed
Argument cannot be null.
Parameter name: format

谢谢!

编辑:另一次通过yum安装的尝试也会产生同样的错误。在新安装时:

代码语言:javascript
复制
    1  yum update -y
    2  yum install wget git curl unzip -y
    3  yum install yum-utils -y
    4  rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"
    5  yum-config-manager --add-repo http://download.mono-project.com/repo/centos/
    6  yum search mono-complete
    7  yum install mono-complete
    8  yum update
    9  echo CERTMGR=$CERTMGR
   10  CERTMGR=/usr/local/bin/certmgr
   11  CERTMGR=/usr/bin/certmgr
   12  echo CERTMGR=$CERTMGR
   13  $CERTMGR -ssl -m https://go.microsoft.com
   14  yes | $CERTMGR -ssl -m https://nugetgallery.blob.core.windows.net
   15  yes | $CERTMGR -ssl -m https://nuget.org
   16  yes | $CERTMGR -ssl -m https://www.myget.org/F/aspnetvnext/
   17  mozroots --import --sync
   18  curl https://raw.githubusercontent.com/aspnet/Home/master/kvminstall.sh | sh && source ~/.kre/kvm/kvm.sh
   19  chmod a+x /root/.kre/kvm/kvm.sh
   20  source /root/.kre/kvm/kvm.sh
   21  kvm upgrade
   22  cd /usr/local/src
   23  git clone https://github.com/aspnet/home
   24  cd home/samples/HelloMvc/
   25  ls
   26  kpm restore
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-01-07 10:53:40

也见KRuntime错误

创建错误的是Mono的控制台实现。赛格色显然是null,因此来自可能的TermInfoReaders之一的阅读失败。

我要说的是,这要么是Mono错误,要么是Mono/CentOS不兼容,要么是丢失的数据包。

您可以检查TERMINFO环境变量设置术语环境变量来显式地选择TermInfoReader。

将项设置为dumb将禁用整个输出,而每一项操作都会正常工作。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27805272

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档