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

时间:2025-02-12 14:55:58

附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

  • 问题描述:

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

    ./qemu-img-hu: error while loading shared libraries: libcrypto.so.10: cannot open shared object file: No such file or directory

    解决方法:执行openssl version查看当前openssl版本是否大于1.0,若版本大于1.0,需要安装1.0版本。

    请依次执行下述命令:

    wget https://github.com/openssl/openssl/releases/download/OpenSSL_1_0_2k/openssl-1.0.2k.tar.gz

    tar -xvf openssl-1.0.2k.tar.gz

    cd openssl-1.0.2k

    ./config -d shared --prefix=/tmp/openssl(安装目录,可自定义)

    make

    make install

    cp /tmp/openssl/lib/libcrypto.so.1.0.0 /usr/lib64/libcrypto.so.10

    使用完成后,如不需要/usr/lib64/libcrypto.so.10文件,可自行删除。

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