Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

-sh: ./demoui: not found 在开发板上运行报错 #105

Open
Ritchie21680 opened this issue Aug 23, 2023 · 5 comments
Open

-sh: ./demoui: not found 在开发板上运行报错 #105

Ritchie21680 opened this issue Aug 23, 2023 · 5 comments

Comments

@Ritchie21680
Copy link

已经交叉编译成功,然后把编译生成的release.tar.gz, 放到U盘,挂到设备上,解压运行demoui, 提示“-sh: ./demoui: not found”

/mnt/udisk/release/bin #
/mnt/udisk/release/bin # ./demoui
-sh: ./demoui: not found
/mnt/udisk/release/bin #
/mnt/udisk/release/bin #

@xianjimli
Copy link
Member

看一下文件格式:

file demoui

@Ritchie21680
Copy link
Author

看一下文件格式:

file demoui

root@lf-virtual-machine:/mnt/hgfs/LinuxApp/awtk-linux-fb/release/bin# file demoui
demoui: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.3, for GNU/Linux 3.2.0, with debug_info, not stripped
root@lf-virtual-machine:/mnt/hgfs/LinuxApp/awtk-linux-fb/release/bin#

看着也是arm的

@sohide
Copy link
Collaborator

sohide commented Aug 26, 2023

可能是要依赖awtk.so文件,用export LD_LIBRARY_PATH=/path/to/so 设置so文件的绝对路径

@Ritchie21680
Copy link
Author

可能是要依赖awtk.so文件,用export LD_LIBRARY_PATH=/path/to/so 设置so文件的绝对路径

/mnt/udisk/bin # ./demoui
-sh: ./demoui: not found
/mnt/udisk/bin #
/mnt/udisk/bin #
/mnt/udisk/bin #
/mnt/udisk/bin #
/mnt/udisk/bin #
/mnt/udisk/bin #
/mnt/udisk/bin #
/mnt/udisk/bin #
/mnt/udisk/bin # ls
demoui libawtk.so libtkc.so
/mnt/udisk/bin #
/mnt/udisk/bin #
/mnt/udisk/bin # export LD_LIBRARY_PATH=/mnt/udisk/bin/libtkc.so
/mnt/udisk/bin # export LD_LIBRARY_PATH=/mnt/udisk/bin/libawtk.so
/mnt/udisk/bin #
/mnt/udisk/bin #
/mnt/udisk/bin # ./demoui
-sh: ./demoui: not found
/mnt/udisk/bin #
/mnt/udisk/bin #
执行导出还是不能运行

@xianjimli
Copy link
Member

看看相关库都找到了吗?

ldd  ./demoui

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants