镜像服务 IMS-通过qemu-img-hw工具转换镜像格式:附2:执行qemu-img-hw常见报错

时间:2024-11-08 10:40:54

附2:执行qemu-img-hw常见报错

  • 问题描述:
    执行qemu-img-hw命令时回显信息如下:
    ./qemu-img-hw: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by ./qemu-img-hw)

    解决方法:

    执行strings /lib64/libc.so.6 | grep GLIBC查看GLIBC版本,若由于版本过低造成,可安装高版本即可。依次执行下述命令:

    wget http://ftp.gnu.org/gnu/glibc/glibc-2.15.tar.gz

    wget http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz

    tar -xvf glibc-2.15.tar.gz

    tar -xvf glibc-ports-2.15.tar.gz

    mv glibc-ports-2.15 glibc-2.15/ports

    mkdir glibc-build-2.15

    cd glibc-build-2.15

    ../glibc-2.15/configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin

    此命令若报错“configure: error: no acceptable C compiler found in $PATH”,请先执行:yum -y install gcc

    make

    make install

  • 问题描述:

    执行qemu-img-hw命令时回显信息如下:

    ./qemu-img-hw: error while loading shared libraries: libaio.so.1: cannot open shared object file: No such file or directory

    解决方法:请先执行命令yum install libaio

support.huaweicloud.com/bestpractice-ims/ims_bp_0052.html