在64位操作系统上运行应用程序构建32位操作系统[Ubuntu] bash:没有这样的文件或目录,C ++,Qt

时间:2013-10-01 15:58:37

标签: c++ qt ubuntu

运行64位操作系统(Ubuntu 13.04)。在我的VirtualBox机器上,我有一个Linux Mint 15 32位。我在Linux Mint 32位上构建我的Qt应用程序,现在想在我的基本操作系统上运行它,安装在我的硬盘上。但是当我想这样做时,bash说:

./app no such file or directory

我确信app位于给定目录中,并且是可执行的(chmod u+x app}。

是否可以在64位操作系统上运行32位Qt应用程序?

安装后:sudo apt-get install ia32-libs我收到了一个新错误:

./app: error while loading shared libraries: libQt5Widgets.so.5: cannot open shared object file: No such file or directory

但我在我的64位操作系统上安装了Qt!

更新:

继承了我的所作所为(在我编译应用程序的机器上 - 32位操作系统):

ldd ./app 

它给了我:

linux-gate.so.1 =>  (0xb7775000)
    libcrypto.so.1.0.0 => /lib/i386-linux-gnu/libcrypto.so.1.0.0 (0xb75b0000)
    libQt5Widgets.so.5 => /usr/lib/i386-linux-gnu/libQt5Widgets.so.5 (0xb6fa2000)
    libQt5Gui.so.5 => /usr/lib/i386-linux-gnu/libQt5Gui.so.5 (0xb6bc3000)
    libQt5Core.so.5 => /usr/lib/i386-linux-gnu/libQt5Core.so.5 (0xb6790000)
    libstdc++.so.6 => /usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb66a7000)
    libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb6664000)
    libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xb6647000)
    libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb6493000)
    libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb648e000)
    libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xb6475000)
    libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb645a000)
    libgobject-2.0.so.0 => /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 (0xb640a000)
    libglib-2.0.so.0 => /lib/i386-linux-gnu/libglib-2.0.so.0 (0xb6308000)
    libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xb61d1000)
    libpng12.so.0 => /lib/i386-linux-gnu/libpng12.so.0 (0xb61a8000)
    libGL.so.1 => /usr/lib/i386-linux-gnu/mesa/libGL.so.1 (0xb614f000)
    libicui18n.so.48 => /usr/lib/i386-linux-gnu/libicui18n.so.48 (0xb5f7b000)
    libicuuc.so.48 => /usr/lib/i386-linux-gnu/libicuuc.so.48 (0xb5e15000)
    librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xb5e0c000)
    /lib/ld-linux.so.2 (0xb7776000)
    libffi.so.6 => /usr/lib/i386-linux-gnu/libffi.so.6 (0xb5e05000)
    libpcre.so.3 => /lib/i386-linux-gnu/libpcre.so.3 (0xb5dc4000)
    libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xb5da2000)
    libglapi.so.0 => /usr/lib/i386-linux-gnu/libglapi.so.0 (0xb5d8a000)
    libXext.so.6 => /usr/lib/i386-linux-gnu/libXext.so.6 (0xb5d78000)
    libXdamage.so.1 => /usr/lib/i386-linux-gnu/libXdamage.so.1 (0xb5d74000)
    libXfixes.so.3 => /usr/lib/i386-linux-gnu/libXfixes.so.3 (0xb5d6d000)
    libX11-xcb.so.1 => /usr/lib/i386-linux-gnu/libX11-xcb.so.1 (0xb5d6a000)
    libxcb-glx.so.0 => /usr/lib/i386-linux-gnu/libxcb-glx.so.0 (0xb5d51000)
    libxcb-dri2.so.0 => /usr/lib/i386-linux-gnu/libxcb-dri2.so.0 (0xb5d4c000)
    libXxf86vm.so.1 => /usr/lib/i386-linux-gnu/libXxf86vm.so.1 (0xb5d46000)
    libdrm.so.2 => /usr/lib/i386-linux-gnu/libdrm.so.2 (0xb5d39000)
    libicudata.so.48 => /usr/lib/i386-linux-gnu/libicudata.so.48 (0xb4bc8000)
    libXau.so.6 => /usr/lib/i386-linux-gnu/libXau.so.6 (0xb4bc3000)
    libXdmcp.so.6 => /usr/lib/i386-linux-gnu/libXdmcp.so.6 (0xb4bbc000)

我在我的32位机器中找到了这些文件,将它们全部复制了,还有可执行文件,所以现在我有了这样的dir层次结构:

enter image description here

platforms目录中我只有:libqlinuxfb.so和libqxcb.so.当我尝试在64位操作系统上运行它时,我做了:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:.

然后:

ldd ./app 
        linux-gate.so.1 =>  (0xf77b4000)
        libcrypto.so.1.0.0 => /lib/i386-linux-gnu/libcrypto.so.1.0.0 (0xf75e3000)
        libQt5Widgets.so.5 (0xf6fd5000)
        libQt5Gui.so.5 (0xf6bf6000)
        libQt5Core.so.5 (0xf67c3000)
        libstdc++.so.6 (0xf66da000)
        libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf6697000)
        libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf667a000)
        libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf64c6000)
        libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf64c1000)
        libz.so.1 => /lib/i386-linux-gnu/libz.so.1 (0xf64a8000)
        libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf648d000)
        libgobject-2.0.so.0 (0xf643d000)
        libglib-2.0.so.0 => /lib/i386-linux-gnu/libglib-2.0.so.0 (0xf633b000)
        libX11.so.6 (0xf6204000)
        libpng12.so.0 => /lib/i386-linux-gnu/libpng12.so.0 (0xf61db000)
        libGL.so.1 => /usr/lib32/nvidia-310/libGL.so.1 (0xf60fb000)
        libicui18n.so.48 (0xf5f27000)
        libicuuc.so.48 (0xf5dc1000)
        librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xf5db8000)
        /lib/ld-linux.so.2 (0xf77b5000)
        libffi.so.6 (0xf5db1000)
        libpcre.so.3 => /lib/i386-linux-gnu/libpcre.so.3 (0xf5d70000)
        libxcb.so.1 (0xf5d4d000)
        libnvidia-tls.so.310.44 => /usr/lib32/nvidia-310/tls/libnvidia-tls.so.310.44 (0xf5d49000)
        libnvidia-glcore.so.310.44 => /usr/lib32/nvidia-310/libnvidia-glcore.so.310.44 (0xf4027000)
        libXext.so.6 (0xf4015000)
        libicudata.so.48 (0xf2ea4000)
        libXau.so.6 (0xf2e9f000)
        libXdmcp.so.6 (0xf2e98000)

现在出现错误:

Failed to load platform plugin "xcb". Available platforms are: 
linuxfb
xcb

Aborted (core dumped)

0 个答案:

没有答案