-sh: ./a.out: not found

感觉程序没有问题,编译生成a.out后,拷贝到开发板执行,提示 -sh: ./a.out: not found。

上网查找问题,大概原因有2个

一就是有可能/lib下面没有C库 就是没有glibc或者uclibc的动态库

二就是你板子上的C库和编译hello链接时用的C库不一样, 差别太大

解决办法:编译选项增加 -static

时间: 2024-08-12 08:12:05

-sh: ./a.out: not found的相关文章

23.dubbo脚本之stop.sh

#!/bin/bash cd `dirname $0` BIN_DIR=`pwd` cd .. DEPLOY_DIR=`pwd` CONF_DIR=$DEPLOY_DIR/conf SERVER_NAME=`sed '/dubbo.application.name/!d;s/.*=//' conf/dubbo.properties | tr -d '\r'` if [ -z "$SERVER_NAME" ]; then     SERVER_NAME=`hostname` fi PID

24.dubbo脚本之server.sh

#!/bin/bash cd `dirname $0` if [ "$1" = "start" ]; then ./start.sh else if [ "$1" = "stop" ]; then ./stop.sh else if [ "$1" = "debug" ]; then ./start.sh debug else if [ "$1" = "res

25.dubbo脚本之restart.sh

#!/bin/bash cd `dirname $0` ./stop.sh ./start.sh

Oracle 11g RAC 二节点root.sh执行报错故障一例

OEL6.X IBM v3500存储多路径配置   http://koumm.blog.51cto.com/703525/1439760 2. 采用RHEL6.5 multipath多路径软件安装采用ASMLIB方式配置ASM共享磁盘成功,但是在第二节点执 行root.sh报如下错误提示,解决方式见3. Disk Group CRS creation failed with the following message:   ORA-15018: diskgroup cannot be creat

当root.sh与ORA-15031相遇

近日处理一个Oracle Grid infrastructure(GI)安装的问题,在执行root.sh过程中失败,并显示下面错误: Disk Group OCR creation failed with the following message: ORA-15018: diskgroup cannot be created ORA-15031: disk specification '/dev/vx/rdsk/dg_db01/lv_vote1' matches no disks    <<

debian和ubuntu的sh dash bash

Ubuntu和debian 的 shell 默认安装的是 dash,而不是 bash.运行以下命令查看 sh 的详细信息,确认 shell 对应的程序是哪个:$ls -al /bin/sh dash 比 bash 更轻,更快.但 bash 却更常用.如果一些命令.脚本等总不能正常执行,有可能是 dash 的原因.比如编译 Android 源代码的时候,如果使用 dash,则有可能编译出错,或者编译的系统不能启动. 通过以下方式可以使 shell 切换回 bash:$sudo dpkg-recon

使用sh库执行shell命令

python中执行shell命令 之前执行shell命令多是通过os.system(shell命令)的方式来执行,比较麻烦. 了解到sh是一个比subprocess好的库,能够执行shell命令 1.查看ip: [[email protected] myblog]# ifconfigeth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500inet 172.31.253.193 netmask 255.255.240.0 broadcas

sh, 批量执行Linux命令

step 1:创建一个sh批处理命令文件 # vim /etc/batch_ssh/install_redis.sh step 2:给当前用户,能够执行sh脚本权限# chmod install_redis.sh 777 step 3: 编写要批量执行的命令,read表示等待前端用户输入,sleep表示等待时间单位为 秒. echo '\n begin to install 01 plugin \n'; yum install cpp -y; echo '\n yum finish instal

linux执行sh报错:$’\r’: 未找到命令的解决

背景 执行.sh脚本时出现$'\r': 未找到命令, 原因 是因为命令直接从windows 复制过来导致的 解决 yum install dos2unix dos2unix **.sh 进行转换 再次执行即可

生产环境上线脚本(update.sh)

#!/bin/sh # Author: bobo365 Filelist=" web_trade 1 static 2 web_portfolio 3 web_live 4 web_topic 5 web_api 6 service_console 7 service_task 8 admin_crm 9 admin_admin 10 mobile_static 11 mobile_web 12 mobile_api 13 public_php 14 interface_package 15 c