您的位置:首页 > 其它

Ubuntu 16.04 建立QUME编译环境报错

2017-02-10 18:23 246 查看

Ubuntu 16.04 建立QEMU编译环境

正常执行apt-get build-dep qemu即可建立qemu编译环境。

build-dep参数

官网解释为:

build-dep causes apt-get to install/remove packages in an attempt to satisfy the build dependencies for a source package.


build-dep参数是指建立某个要编译软件的环境,比如现在要手工编译QUME,那如果想让编译正常通过,则需要事先把编译过程中需要用到的软件包先配置好。

在安装直接apt-get build-dep qemu报错

但是执行命令后报错:

E: You must put some 'source' URIs in your sources.list


内心os:难道是软件源选的不对,下载列表里找不到qemu?于是各种尝试换软件源未果。最后发现是Ubuntu Software配置没有选source code,操作方法如下:

Ubuntu Software -> Software & Updates -> Ubuntu Software -> 勾选source code


但是执行apt-get build-dep qemu仍然报错:

Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
builddeps:qemu : Depends: librados-dev but it is not going to be installed
Depends: librbd-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.


由于之前尝试过程中用了apt-get install qemu,猜想不能install的原因是之前已经install过了,所以remove之前的install。

sudo apt-get remove qemu


然而问题依然存在,apt-get build-dep qemu报错依旧。看提示说有包装不上,想想之前换过源,猜想可能是不同源中的程序不一样,遂换成Ubuntu官方源,并更新:

sudo apt-get update  %更新列表
sudo apt-get upgrade %更新已安装的程序


之后apt-get build-dep qemu成功。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: