c - 在 Debian 上运行 C 程序的问题

标签 c linux deployment debian

我有以下问题:我使用 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/

相关文章:

docker - 使用 docker 部署应用程序时如何更新我的应用程序

linux - 用于日期操作的 Shell 脚本

python - subprocess.Popen() : OSError: [Errno 8] Exec format error in python?

c - C 程序没有得到预期的错误输出

c - 如何使用 apr 从在新进程中运行的程序捕获 stdout/stderr 输出?

java - 在Activiti工作流引擎上部署: NullPointerException Error

jenkins - Jenkins-在执行脚本中设置环境变量

c - 遗传算法、群体初始化

c++ - 自动更新结构体中的指针值

c - 当我尝试读取 txt 文件时,fopen() 总是返回 NULL