因为spice的工程是一个非常标准的linux工程,所以我们就可以直接安装tarball编译的三步走完成安装,下面是在centos7下面的编译过程:
2、进入spice-0.13.1目录,会看到源码和configure等文件;
3、首先执行一下configure脚本,
./configure --prefix=/usr/local/spice (要确保存在/usr/local/spice目录)会提示:
checking for SPICE_PROTOCOL... no
configure: error: Package requirements (spice-protocol >= 0.12.11) were not met:
No package 'spice-protocol' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables SPICE_PROTOCOL_CFLAGS
and SPICE_PROTOCOL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
这个错误说明没有安装spice-protocol,并且需要不小于0.12.11版本的spice-protocol。
那么我们直接tarball编译安装spice-protocol最新版本:
1>从spice官网下载最新的spice-protocol-0.12.11.tar.bz2解压缩到/usr/local/src目录下,然后会在这个目录下多出一个spice-protocol-0.12.11目录
2>进入spice-0.13.1目录,会看到源码和configure等文件,执行命令:./configure --prefix=/usr/local/spice (要确保存在/usr/local/spice目录)
3>最后就是make和make install,非常顺利的吧最新版本spice-protocol安装到了/usr/local/spice目录下,如果/usr/local/spice目录原先是干净的,那么通过命令我们可以看到如下内容
[root@localhost ~]# cd /usr/local/spice
[root@localhost spice]# ll
total 0
drwxr-xr-x. 3 root root 20 May 25 17:28 include
drwxr-xr-x. 3 root root 22 May 25 17:28 share
[root@localhost spice]# ll -a
total 4
drwxr-xr-x. 4 root root 32 May 25 17:28 .
drwxr-xr-x. 13 root root 4096 May 25 17:24 ..
drwxr-xr-x. 3 root root 20 May 25 17:28 include
drwxr-xr-x. 3 root root 22 May 25 17:28 share
[root@localhost spice]# cd share
[root@localhost share]# ll
total 0
drwxr-xr-x. 2 root root 30 May 25 17:28 pkgconfig
[root@localhost share]# cd pkgconfig/
[root@localhost pkgconfig]# pwd
/usr/local/spice/share/pkgconfig ===》这个路径很重要,一会儿会用到,(自己可以查询资料了解pkg路径的作用)
[root@localhost pkgconfig]# ls
spice-protocol.pc
4、安装完最新的spcie-protocol后,再次执行./configure --prefix=/usr/local/spice,仍然出现第三步的错误,
2、进入spice-0.13.1目录,会看到源码和configure等文件;
3、首先执行一下configure脚本,
./configure --prefix=/usr/local/spice (要确保存在/usr/local/spice目录)会提示:
checking for SPICE_PROTOCOL... no
configure: error: Package requirements (spice-protocol >= 0.12.11) were not met:
No package 'spice-protocol' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables SPICE_PROTOCOL_CFLAGS
and SPICE_PROTOCOL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
这个错误说明没有安装spice-protocol,并且需要不小于0.12.11版本的spice-protocol。
那么我们直接tarball编译安装spice-protocol最新版本:
1>从spice官网下载最新的spice-protocol-0.12.11.tar.bz2解压缩到/usr/local/src目录下,然后会在这个目录下多出一个spice-protocol-0.12.11目录
2>进入spice-0.13.1目录,会看到源码和configure等文件,执行命令:./configure --prefix=/usr/local/spice (要确保存在/usr/local/spice目录)
3>最后就是make和make install,非常顺利的吧最新版本spice-protocol安装到了/usr/local/spice目录下,如果/usr/local/spice目录原先是干净的,那么通过命令我们可以看到如下内容
[root@localhost ~]# cd /usr/local/spice
[root@localhost spice]# ll
total 0
drwxr-xr-x. 3 root root 20 May 25 17:28 include
drwxr-xr-x. 3 root root 22 May 25 17:28 share
[root@localhost spice]# ll -a
total 4
drwxr-xr-x. 4 root root 32 May 25 17:28 .
drwxr-xr-x. 13 root root 4096 May 25 17:24 ..
drwxr-xr-x. 3 root root 20 May 25 17:28 include
drwxr-xr-x. 3 root root 22 May 25 17:28 share
[root@localhost spice]# cd share
[root@localhost share]# ll
total 0
drwxr-xr-x. 2 root root 30 May 25 17:28 pkgconfig
[root@localhost share]# cd pkgconfig/
[root@localhost pkgconfig]# pwd
/usr/local/spice/share/pkgconfig ===》这个路径很重要,一会儿会用到,(自己可以查询资料了解pkg路径的作用)
[root@localhost pkgconfig]# ls
spice-protocol.pc
4、安装完最新的spcie-protocol后,再次执行./configure --prefix=/usr/local/spice,仍然出现第三步的错误,