最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【已解决】Ubuntu下安装QEMU在配置时出错:ERROR: zlib check failed

QEMU crifan 10672浏览 0评论

【问题】

折腾:

【记录】在Ubuntu 13.04上安装QEMU

期间,在Ubuntu下,去配置QEMU时,结果出错:

crifan@ubuntu:qemu-1.6.0-rc3$ ./configure --prefix=/opt/qemu --target-list=arm-softmmu,arm-linux-user --enable-debug

ERROR: zlib check failed
       Make sure to have the zlib libs and headers installed.

截图:

install qemu ERROR zlib check failed

【解决过程】

1.很是奇怪。之前从来没遇到这种zlib校验出错的问题。

2.参考:

Re: [Qemu-discuss] Configure error with qemu 1.4

说是要安装zlib-devel

参考:

qemu 编译

说是要安装zlib1g-dev

3.所以,要去搞清楚,到底安装哪个。

crifan@ubuntu:qemu-1.6.0-rc3$ apt-cache search zlib
advancecomp - collection of recompression utilities
libapache2-mod-php5 - server-side, HTML-embedded scripting language (Apache 2 module)
libarchive-dev - Multi-format archive and compression library (development files)
libarchive13 - Multi-format archive and compression library (shared library)
libmng-dev - M-N-G library (Development headers)
libmng1 - Multiple-image Network Graphics library
libruby - Libraries necessary to run Ruby
libruby1.8 - Libraries necessary to run Ruby 1.8
libsnappy-dev - fast compression/decompression library (development files)
libsnappy1 - fast compression/decompression library
libx32z1 - compression library - x32 runtime
libx32z1-dev - compression library - x32 development
perl - Larry Wall's Practical Extraction and Report Language
perl-modules - Core Perl modules
php5-cgi - server-side, HTML-embedded scripting language (CGI binary)
php5-cli - command-line interpreter for the php5 scripting language
squashfs-tools - Tool to create and append to squashfs filesystems
squashfs-tools-dbg - Tool to create and append to squashfs filesystems (debug)
zlib1g - compression library - runtime
zlib1g-dbg - compression library - development
zlib1g-dev - compression library - development
lib64z1 - compression library - 64 bit runtime
lib64z1-dev - compression library - 64 bit development
apf-client - Client for Active Port Forwarding
apf-server - Server for Active Port Forwarding
cl-salza - Common Lisp package to write compressed data
clisp-module-zlib - clisp module that adds zlib support for vectors
cpm - Curses based password manager using PGP-encryption
dact - multi-algorithm compression
dmg2img - Tool for converting compress dmg files to hfsplus images
fp-units-base - Free Pascal - base units dependency package
fp-units-base-2.6.0 - Free Pascal - base units
fp-units-misc - Free Pascal - miscellaneous units dependency package
fp-units-misc-2.6.0 - Free Pascal - miscellaneous units
gambas3-gb-compress-bzlib2 - Gambas bzlib2 component
gambas3-gb-compress-zlib - Gambas zlib compression component
gauche-zlib - zlib binding for Gauche
iptstate - top-like interface to your netfilter connection-tracking table
libapache2-mod-php5filter - server-side, HTML-embedded scripting language (apache 2 filter module)
libcatalyst-plugin-compress-perl - Catalyst plugin to compress the response
libcoin60 - high-level 3D graphics kit implementing the Open Inventor API
libcompress-raw-zlib-perl - low-level interface to zlib compression library
libcryptokit-ocaml - cryptographic algorithm library for OCaml - runtime
libcryptokit-ocaml-dev - cryptographic algorithm library for OCaml - development
libghc-bzlib-dev - Haskell bindings to the bzip2 library
libghc-bzlib-doc - Documentation for the Haskell bindings to the bzip2 library
libghc-bzlib-prof - Profiling libraries for the Haskell bindings to the bzip2 library
libghc-digest-dev - efficient cryptographic hash implementations for bytestrings
libghc-digest-doc - efficient cryptographic hash implementations bytestrings; documentation
libghc-digest-prof - efficient cryptographic hash implementations bytestrings; profiling library
libghc-zlib-bindings-dev - low-level bindings to zlib
libghc-zlib-bindings-doc - low-level bindings to zlib; documentation
libghc-zlib-bindings-prof - low-level bindings to zlib; profiling libraries
libghc-zlib-conduit-dev - streaming compression/decompression via conduits
libghc-zlib-conduit-doc - streaming compression/decompression via conduits; documentation
libghc-zlib-conduit-prof - streaming compression/decompression via conduits; profiling libraries
libghc-zlib-dev - Compression and decompression in the gzip and zlib formats
libghc-zlib-doc - Compression and decompression in the gzip and zlib formats; documentation
libghc-zlib-enum-dev - enumerator interface for zlib compression
libghc-zlib-enum-doc - enumerator interface for zlib compression; documentation
libghc-zlib-enum-prof - enumerator interface for zlib compression; profiling libraries
libghc-zlib-prof - Compression and decompression in the gzip and zlib formats; profiling libraries
libgzstream-tulip-3.7.0 - gzstream shared library, built for Tulip
libio-compress-perl - bundle of IO::Compress modules
libjzlib-java - reimplementation of zlib in pure Java
liblz-dbg - data compressor based on the LZMA algorithm (debug)
liblz-dev - data compressor based on the LZMA algorithm (development)
liblz1 - data compressor based on the LZMA algorithm (library)
libnifti-dev - IO libraries for the NIfTI-1 data format
libnifti2 - IO libraries for the NIfTI-1 data format
libphp5-embed - HTML-embedded scripting language (Embedded SAPI library)
libpnglite-dev - lightweight C library for loading and writing PNG images
libwww-mechanize-gzip-perl - Perl module to fetch webpages with gzip-compression
libzip-ruby1.8 - a ruby module for reading and writing zip files
libzip-ruby1.9.1 - a ruby module for reading and writing zip files
libzlcore-data - ZLibrary cross-platform development library (support files)
libzlcore-dev - ZLibrary cross-platform development library (development files)
libzlcore0.12 - ZLibrary cross-platform development library (shared library)
libzltext-data - ZLibrary text model/viewer part (support files)
libzltext-dev - ZLibrary text model/viewer part (development files)
libzltext0.12 - ZLibrary text model/viewer part (shared library)
libzlui-gtk - GTK+ interface module for ZLibrary
libzlui-qt4 - Qt4 interface module for ZLibrary
libzzip-0-13 - library providing read access on ZIP-archives - library
libzzip-dev - library providing read access on ZIP-archives - development
lua-zlib - zlib library for the Lua language
lua-zlib-dev - zlib development files for the Lua language
node-zlib - zlib bindings for node.js
php-text-figlet - PEAR module for rendering text using FIGlet fonts
php5-fpm - server-side, HTML-embedded scripting language (FPM-CGI binary)
r-cran-digest - GNU R package for 'hash digest' of R data structures
tcl-trf - Tcl data transformations - runtime library
tcl-trf-dev - Tcl data transformations - development files
tcl-trf-doc - Tcl data transformations - development files
tightvncserver - virtual network computing server software
xtightvncviewer - virtual network computing client software for X
yorick-z - zlib, jpeg and png support for the Yorick language
zlib-bin - compression library - sample programs
zlib-gst - Zlib bindings for GNU Smalltalk
zlibc - An on-fly auto-uncompressing C library
zziplib-bin - library providing read access on ZIP-archives - binaries

看起来,比较像是zlib1g和zlib1g-dev,所以去安装:

crifan@ubuntu:qemu-1.6.0-rc3$ sudo apt-get install zlib1g
zlib1g      zlib1g-dbg  zlib1g-dev  
crifan@ubuntu:qemu-1.6.0-rc3$ sudo apt-get install zlib1g zlib
zlib1g      zlib1g-dbg  zlib1g-dev  zlib-bin    zlibc       zlib-gst    
crifan@ubuntu:qemu-1.6.0-rc3$ sudo apt-get install zlib1g zlib1g-dev 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
zlib1g is already the newest version.
The following NEW packages will be installed:
  zlib1g-dev
0 upgraded, 1 newly installed, 0 to remove and 13 not upgraded.
Need to get 177 kB of archives.
After this operation, 420 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://mirrors.ustc.edu.cn/ubuntu/ raring/main zlib1g-dev i386 1:1.2.7.dfsg-13ubuntu2 [177 kB]
Fetched 177 kB in 0s (1,333 kB/s)
Selecting previously unselected package zlib1g-dev:i386.
(Reading database ... 189481 files and directories currently installed.)
Unpacking zlib1g-dev:i386 (from .../zlib1g-dev_1%3a1.2.7.dfsg-13ubuntu2_i386.deb) ...
Processing triggers for man-db ...
Setting up zlib1g-dev:i386 (1:1.2.7.dfsg-13ubuntu2) ...
crifan@ubuntu:qemu-1.6.0-rc3$ 

然后试试是否解决了问题,结果解决了问题。

 

【总结】

当配置QEMU时出现:

ERROR: zlib check failed

的错误时,去安装对应的缺少的zlib库:

sudo apt-get install zlib1g

即可解决问题。


虽然解决了此问题,但是后续又出现别的问题:

【已解决】Ubuntu下配置QEMU出错:ERROR: glib-2.12 required to compile QEMU

转载请注明:在路上 » 【已解决】Ubuntu下安装QEMU在配置时出错:ERROR: zlib check failed

发表我的评论
取消评论

表情

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
83 queries in 0.203 seconds, using 22.12MB memory