安装bochs问题的解决

来源:互联网 发布:sql server有什么优势 编辑:程序博客网 时间:2024/05/16 04:09

就像大部分软件一样,在不同的操作系统里面安装Bochs的过程是不同的,在Windows中,最方便的方法就是从Bochs的官方网站获取安装程序来安装(安装时不妨将“DLX Linux Demo”选中,这样你可以参考它的配置文件)。

在Linux中,不同的发行版(distribution)处理方法可能不同。比如,如果你用的是 Debian GNU/Linux或其近亲(比如Ubuntu),可以使用这样的命令:
$ sudo apt-get install vgabios bochs bochs-x bximage
敲入这样一行命令,不一会儿就装好了。缺点:没有调试功能的,这显然不能满足我们的需要,所以最好的方法还是从源代码安装.


首先下载最新Bochs源代码版本到: http://bochs.sourceforge.net/getcurrent.html

http://bochs.sourceforge.net/cgi-bin/to ... _ideq12580

下载的版本是bochs-2.4.5.tar.gz,那么安装过程差不多是这样的:


$ tar zxvf bochs-2.4.5.tar.gz

$ cd bochs-2.4.5

$ ./configure --enable-debugger --enable-disasm

$ make

$ sudo make install



错误1:

checking how to run the C++ preprocessor... /lib/cpp
configure: error: in `/home/lmy/Downloads/bochs-2.4.5':
configure: error: C++ preprocessor "/lib/cpp" fails sanity check

解决方法:通过新立得安装build-essential

错误2:

checking for default gui on this platform... x11
ERROR: X windows gui was selected, but X windows libraries were not found.
解决方法:通过新立得安装xorg-dev
错误3:
ERROR: pkg-config was not found, or unable to access the gtk+-2.0 package.
解决方法: 通过新立得安装libgtk2.0-dev

3.运行Bochs
在Bochs主页,下载Linux映像文件http://bochs.sourceforge.net/guestos/linux-img.tar.gz
将文件解压,会产生linux-img这样到文件夹,命令行切换到此文件夹下,执行bochs,会在当前目录读取bochsrc启动虚拟机配置
lmy@ubuntu:~/Downloads/linux-img$ bochs

此时可能提示如下错误:
Bochs is exiting with the following message:
[ ] bochsrc:11: directive 'ips' not understood


更改配置文件bochsrc即可,将ips行注释掉

 

转载:http://hi.baidu.com/reince/blog/item/ec32746e17c716ca81cb4a98.html

原创粉丝点击