阿里云安装Mono 发生错误解决方法
园豆兑换阿里云代金券 体验阿里云云服务器 http://home.cnblogs.com/activity/aliyun 活动,花1块钱体验了一下阿里云,安装了CentOS6.2后,在其上按照《 32和64位的CentOS 6.0下 安装 Mono 2.10.8 和Jexus 5.0 》,在执行yum 更新系统的时候就发生了如下错误:
--> Running transaction check
---> Package gc.x86_64 0:7.1-10.el6 will be installed
---> Package glibc-headers.x86_64 0:2.12-1.80.el6_3.5 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2. 12-1.80.el6_3.5.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.12-1.80.e l6_3.5.x86_64
--> Finished Dependency Resolution
Error: Package: glibc-headers-2.12-1.80.el6_3.5.x86_64 (updates)
Requires: kernel-headers
Error: Package: glibc-headers-2.12-1.80.el6_3.5.x86_64 (updates)
Requires: kernel-headers >= 2.2.1
You could try using --skip-broken to work around the problem
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
kernel-2.6.32-220.13.1.el6.x86_64 has missing requires of kernel-firmware >= ('0 ', '2.6.32', '220.13.1.el6')
解决方法:修改文件vi /etc/yum.conf 将exclude=kernel*前加注释即可解决,此参数的意思是排除安装或更新kernel开头的软件,而我们安装gcc需要依赖kernel相关的软件glibc-headers-2.12-1.80.el6_3.5.x86_64 。
51CTO最近举办 2012年度IT博客大赛, 期待博客园的同学们鼎力相助
作者: 自由、创新、研究、探索……
出处: http://shanyou.cnblogs.com/
版权:本文版权归作者和博客园共有
转载:欢迎转载,为了保存作者的创作热情,请按要求【转载】,谢谢
要求:未经作者同意,必须保留此段声明;必须在文章中给出原文连接;否则必究法律责任
分类: Linux/Mono , LMJA
园豆兑换阿里云代金券 体验阿里云云服务器 http://home.cnblogs.com/activity/aliyun 活动,花1块钱体验了一下阿里云,安装了CentOS6.2后,在其上按照《 32和64位的CentOS 6.0下 安装 Mono 2.10.8 和Jexus 5.0 》,在执行yum 更新系统的时候就发生了如下错误:
--> Running transaction check
---> Package gc.x86_64 0:7.1-10.el6 will be installed
---> Package glibc-headers.x86_64 0:2.12-1.80.el6_3.5 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2. 12-1.80.el6_3.5.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.12-1.80.e l6_3.5.x86_64
--> Finished Dependency Resolution
Error: Package: glibc-headers-2.12-1.80.el6_3.5.x86_64 (updates)
Requires: kernel-headers
Error: Package: glibc-headers-2.12-1.80.el6_3.5.x86_64 (updates)
Requires: kernel-headers >= 2.2.1
You could try using --skip-broken to work around the problem
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
kernel-2.6.32-220.13.1.el6.x86_64 has missing requires of kernel-firmware >= ('0 ', '2.6.32', '220.13.1.el6')
解决方法:修改文件vi /etc/yum.conf 将exclude=kernel*前加注释即可解决,此参数的意思是排除安装或更新kernel开头的软件,而我们安装gcc需要依赖kernel相关的软件glibc-headers-2.12-1.80.el6_3.5.x86_64 。
51CTO最近举办 2012年度IT博客大赛, 期待博客园的同学们鼎力相助
作者: 自由、创新、研究、探索……
出处: http://shanyou.cnblogs.com/
版权:本文版权归作者和博客园共有
转载:欢迎转载,为了保存作者的创作热情,请按要求【转载】,谢谢
要求:未经作者同意,必须保留此段声明;必须在文章中给出原文连接;否则必究法律责任
分类: Linux/Mono , LMJA
园豆兑换阿里云代金券 体验阿里云云服务器 http://home.cnblogs.com/activity/aliyun 活动,花1块钱体验了一下阿里云,安装了CentOS6.2后,在其上按照《 32和64位的CentOS 6.0下 安装 Mono 2.10.8 和Jexus 5.0 》,在执行yum 更新系统的时候就发生了如下错误:
--> Running transaction check
---> Package gc.x86_64 0:7.1-10.el6 will be installed
---> Package glibc-headers.x86_64 0:2.12-1.80.el6_3.5 will be installed
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers-2. 12-1.80.el6_3.5.x86_64
--> Processing Dependency: kernel-headers for package: glibc-headers-2.12-1.80.e l6_3.5.x86_64
--> Finished Dependency Resolution
Error: Package: glibc-headers-2.12-1.80.el6_3.5.x86_64 (updates)
Requires: kernel-headers
Error: Package: glibc-headers-2.12-1.80.el6_3.5.x86_64 (updates)
Requires: kernel-headers >= 2.2.1
You could try using --skip-broken to work around the problem
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
kernel-2.6.32-220.13.1.el6.x86_64 has missing requires of kernel-firmware >= ('0 ', '2.6.32', '220.13.1.el6')
解决方法:修改文件vi /etc/yum.conf 将exclude=kernel*前加注释即可解决,此参数的意思是排除安装或更新kernel开头的软件,而我们安装gcc需要依赖kernel相关的软件glibc-headers-2.12-1.80.el6_3.5.x86_64 。
51CTO最近举办 2012年度IT博客大赛, 期待博客园的同学们鼎力相助
作者: 自由、创新、研究、探索……
出处: http://shanyou.cnblogs.com/
版权:本文版权归作者和博客园共有
转载:欢迎转载,为了保存作者的创作热情,请按要求【转载】,谢谢
要求:未经作者同意,必须保留此段声明;必须在文章中给出原文连接;否则必究法律责任
分类: Linux/Mono , LMJA
1.线程(Thread)的概念理解
这段比较枯燥,都是些概念性的东西。可以参考 维基百科中的解释 。我们一般多数都听过进程,那么计算机中的进程又是什么,它跟咱们常说的进程是什么关系?
比较学术的解释是这个样子描述的:线程是程序运行的基本执行单元。所以当我们的操作系统在执行某个程序(也许是QQ)的时候,就会在系统中建立一个进程(PS:你可以使用ctrl+shilt+del来唤出你的windows任务管理器看看你现在系统中的进程),而在这个进程中 必须至少 建立一个线程(主线程)来作为这个程序的运行的入口点。有点下面图示的意思:
在操作系统将进程分成多个线程后,这些线程可以在操作系统的管理下并发执行,从而大大提高了程序的运行效率。
2.java的线程模型
(一)在Java中主要是有一个Thread的类来掌管线程的,那么它有什么神奇的地方吗?当我们new出来一个Thread对象的时候,其实一个线程就被我们定义好了,而后如何去建立和执行这个线程呢?那java当然会提供人性化的方法,就是Thread的start方法,它就负责建立线程,相当于调用了操作系统的CreateRhread。当start方法调用后,Thread对象就会自动找到run方法,然后执行run方法。所以, 何继承Thread的Java类都可以通过Thread类的start方法来建立线程。如果想运行自己的线程执行函数,那就要覆盖Thread类的run方法 。
(二)除Thread外,java还提供了一个Runable接口来标识class是否可作为线程类,这个接口只有一个run的抽象方法,用于Thread的调用。此为方法二:实现Runnable接口,并通过Thread和实现Runnable的类来建立线程。
3.应用举例
传统的线程建立过程
方法一
继承Thread类,重写run方法,然后调用其start方法:
Thread thread = new Thread() { @Override public void run() { while ( true ) { try { Thread.sleep( 500 ); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println( "1:" + Thread.currentThread().getName() + " runing ..... " ); System.out .println( "2:" + this .getName() + " runing ..... " ); super .run(); } } }; thread.start();
方法二
实现Runnable接口,并通过Thread和实现Runnable的类来建立线程
Thread thread2 = new Thread( new Runnable() { @Override public void run() { while ( true ) { try { Thread.sleep( 500 ); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println( "3:" + Thread.currentThread().getName() + " runing ..... " ); } } }); thread2.start();
出面向对象的角度出发方法二是不是由于方法一呢?
下面是一段思考题:
new Thread( new Runnable() { @Override public void run() { while ( true ) { try { Thread.sleep( 500 ); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println( "Runnable:" + Thread.currentThread().getName() + " runing ..... " ); } } }) { @Override public void run() { while ( true ) { try { Thread.sleep( 500 ); } catch (InterruptedException e) { e.printStackTrace(); } System.out.println( "Thread:" + Thread.currentThread().getName() + " runing ..... " ); } } }.start();
那么上面这段代码的执行结果会是什么呢?
呀?这么会有这样的写法?即是Thread的子类,又使用实现了Runnable接口的类来建立线程。那到底是执行力子类中的run方法,还是Runnable中的run方法呢?
请看下面的一段Thread的源码
/** * If this thread was constructed using a separate * <code>Runnable</code> run object, then that * <code>Runnable</code> object's <code>run</code> method is called; * otherwise, this method does nothing and returns. * <p> * Subclasses of <code>Thread</code> should override this method. * * @see #start() * @see #stop() * @see #Thread(ThreadGroup, Runnable, String) */ public void run() { if (target != null ) {//这里是不是很清楚了,当我们没有一个实现了Runnable接口的类作为target的时候,就会调用Thread自己的run方法来,也就是咱们子类的run target.run(); } }
是不是一下就清楚了,所以最后的执行结果应该是:
Thread:Thread-0 runing .....
哈哈~~~
PS: 我们一定要从源码上,从面向对象的思想上来分析问题 。
联佳句题流水,十载幽思满素怀。今日却成鸾凤友,方知红叶是良媒。
分类: 深入理解java多线程学习笔记
标签: java , Thread , 多线程
作者: Leo_wl
出处: http://www.cnblogs.com/Leo_wl/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
版权信息查看更多关于阿里云安装Mono 发生错误解决方法的详细内容...