我有以下问题:我使用 CodeBlocks 在 Linux Ubuntu 9.10 上编译了我的应用程序。它是一个 C 程序(它使用了很少的库,如 libmysql、jasper ...) 我将编译后的程序复制到运行 Debian 2.6.18 的远程系统,chmodded +x 应用程序但是在调用 ./my_app bash 时仍然说“没有这样的文件或目录”
我需要在目标系统上编译我的程序吗?我确定程序需要的所有库都安装在目标系统上。
感谢您的任何建议。
最佳答案
您的诊断尝试 (LDD) 和报告的错误消息(没有这样的文件,不是动态可执行文件)不是很有帮助。 “file my_app”的输出可能更具指示性。但你不必努力。来自声称在 the Wiki 中为 Ubuntu 说话的人:
A lot has been said about the fact that Debian is not binary-compatible with Ubuntu.
...
Just to be clear, I'll say it again, for the record. We don't aim for "binary compatibility" with any other distribution. Why? ...
In short, because we believe in Free Software as a collaborative process focused on SOURCE CODE, and consider it superior to the proprietary process which is focused on specific applications and binary bits.
所以,是的,您确实需要重新编译。
关于c - 在 Debian 上运行 C 程序的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2355082/