此错误是什么意思:解释器/lib/ld-linux-armhf.so.3错误读取(无效参数)

此错误是什么意思:解释器/lib/ld-linux-armhf.so.3错误读取(无效参数),linux,qt,gcc,arm,embedded,Linux,Qt,Gcc,Arm,Embedded,我使用本指南文档安装cross compiler 4.9.3和qt4.8.6。我安装了它们并检查其版本是否正确。 然后: 然后我写了: #include <QApplication> #include <QPushButton> int main(int argc, char **argv) { QApplication app (argc, argv); QPushButton button ("Hello world !");

我使用本指南文档安装cross compiler 4.9.3和qt4.8.6。我安装了它们并检查其版本是否正确。

然后:

然后我写了:

#include <QApplication>
#include <QPushButton>
int main(int argc, char **argv)
{
        QApplication app (argc, argv);
        QPushButton button ("Hello world !");
        button.show();
        return app.exec();
}
当我在ubuntu qt core中运行此程序时,我看到以下内容:

root@NanoPC-T2:/# tftp 192.168.101.4
tftp> get helloqt
Received 11660 bytes in 0.4 seconds
tftp> quit
root@NanoPC-T2:/# chmod +x helloqt
root@NanoPC-T2:/# .setqt4env
-bash: .setqt4env: command not found
root@NanoPC-T2:/# . setqt4env
ctp = 1
root@NanoPC-T2:/# ./helloqt -qws &
[1] 1909
root@NanoPC-T2:/# ./helloqt -qws &
[2] 1910
[1]   Segmentation fault      ./helloqt -qws
root@NanoPC-T2:/# ./helloqt -qws
[2]+  Segmentation fault      ./helloqt -qws
Segmentation fault
root@NanoPC-T2:/#  ./helloqt -qws
Segmentation fault
root@NanoPC-T2:/# [2]+  Segmentation fault      ./helloqt -qws
-bash: [2]+: command not found
root@NanoPC-T2:/# Segmentation fault
-bash: Segmentation: command not found
root@NanoPC-T2:/# file ./helloqt
./helloqt: ERROR: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3 error reading (Invalid argument)

如何解决此错误?

这表示您的文件二进制文件已损坏。我执行以下操作来纠正问题:

  • 我的tslib配置不好,此代码解决了我的第一个问题:

    sudo ac_cv_func_malloc_0_nonnull=yes./configure CC=/opt/FriendlyARM/toolchain/4.9.3/bin/arm-none-linux-gnueabihf-gcc CXX=/opt/FriendlyARM/toolchain/4.9.3/bin/arm-none-linux-gnueabihf-g++--主机=arm-none-linux-gnueabihf目标=arm-none-linux-gnueabihf---enable-enable static=yes--------启用共享=yes-prefix=/home/

  • 您应该使用SFTP(安全ftp)将可运行程序复制到您的设备,它不会更改您的文件类型


  • 检查你的系统arch@H.Ghassami,您的拱门是什么?用于nanopc-T2的armv7l
    cd ~/helloqt
    /usr/local/Trolltech/QtEmbedded-4.8.6-arm/bin/qmake -project 
    /usr/local/Trolltech/QtEmbedded-4.8.6-arm/bin/qmake
    make
    
    root@NanoPC-T2:/# tftp 192.168.101.4
    tftp> get helloqt
    Received 11660 bytes in 0.4 seconds
    tftp> quit
    root@NanoPC-T2:/# chmod +x helloqt
    root@NanoPC-T2:/# .setqt4env
    -bash: .setqt4env: command not found
    root@NanoPC-T2:/# . setqt4env
    ctp = 1
    root@NanoPC-T2:/# ./helloqt -qws &
    [1] 1909
    root@NanoPC-T2:/# ./helloqt -qws &
    [2] 1910
    [1]   Segmentation fault      ./helloqt -qws
    root@NanoPC-T2:/# ./helloqt -qws
    [2]+  Segmentation fault      ./helloqt -qws
    Segmentation fault
    root@NanoPC-T2:/#  ./helloqt -qws
    Segmentation fault
    root@NanoPC-T2:/# [2]+  Segmentation fault      ./helloqt -qws
    -bash: [2]+: command not found
    root@NanoPC-T2:/# Segmentation fault
    -bash: Segmentation: command not found
    root@NanoPC-T2:/# file ./helloqt
    ./helloqt: ERROR: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3 error reading (Invalid argument)