解决-/bin/sh: ./xxx: not found

今天使用busybox制作的最小根文件系统跑我的服务端程序
结果却显示在这里插入图片描述
原因是没有程序运行所需要的的动态库
解决办法
1、导入动态库(导入交叉编译器的lib)
2、编译程序时加上 -static 选项

2025-06-11 11:54:40.062 | DOCKER_DEPLOY_TYPE=VM 2025-06-11 11:54:40.066 | ==> INIT /alidata/init/02init-sshd.sh 2025-06-11 11:54:40.072 | ==> EXIT CODE: 0 2025-06-11 11:54:40.072 | ==> INIT /alidata/init/fix-hosts.py 2025-06-11 11:54:40.103 | ==> EXIT CODE: 0 2025-06-11 11:54:40.103 | ==> INIT DEFAULT 2025-06-11 11:54:40.105 | Failed to get D-Bus connection: Operation not permitted 2025-06-11 11:54:40.106 | ==> INIT DONE 2025-06-11 11:54:40.106 | ==> RUN /bin/sh -c # 确保目录结构完整 2025-06-11 11:54:40.106 | mkdir -p /home/admin/canal-server/logs; 2025-06-11 11:54:40.106 | cd /home/admin/canal-server; 2025-06-11 11:54:40.106 | 2025-06-11 11:54:40.106 | # 打印关键配置 2025-06-11 11:54:40.106 | echo "===== 有效配置 ====="; 2025-06-11 11:54:40.106 | echo "canal.properties:"; 2025-06-11 11:54:40.106 | cat conf/canal.properties; 2025-06-11 11:54:40.106 | echo "instance.properties:"; 2025-06-11 11:54:40.106 | cat conf/example/instance.properties; 2025-06-11 11:54:40.106 | echo "===================="; 2025-06-11 11:54:40.106 | 2025-06-11 11:54:40.106 | # 启动 Canal 服务器 2025-06-11 11:54:40.106 | exec java ${JAVA_OPTS} -cp "conf:lib/*" \ 2025-06-11 11:54:40.106 | com.alibaba.otter.canal.deployer.CanalLauncher 2025-06-11 11:54:40.106 | 2025-06-11 11:54:40.106 | Failed to get D-Bus connection: Operation not permitted 2025-06-11 11:54:40.108 | ===== 有效配置 ===== 2025-06-11 11:54:40.108 | canal.properties: 2025-06-11 11:54:40.110 | canal.id = 1001 2025-06-11 11:54:40.110 | canal.port = 11111 2025-06-11 11:54:40.110 | canal.destinations = example 2025-06-11 11:54:40.110 | canal.zookeeper.switch = false 2025-06-11 11:54:40.110 | canal.instance.global.spring.xml = classpath:spring/default-instance.xmlinstance.properties: 2025-06-11 11:54:40.113 | canal.instance.mysql.slaveId = 1234 2025-06-11 11:54:40.113 | canal.instance.master.address = host.docker.internal:3306 2025-06-11 11:54:40.113 | canal.instance.dbUsername = canal 2025-06-11 11:54:40.113 | canal.instance.dbPassword = tx123456 2025-06-11 11:54:40.113 | canal.instance.connectionCharset = UTF-8 2025-06-11 11:54:40.113 | canal.instance.filter.regex = .*\\..*==================== 2025-06-11 11:54:40.323 | 03:54:40,213 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback-test.xml] 2025-06-11 11:54:40.323 | 03:54:40,213 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy] 2025-06-11 11:54:40.323 | 03:54:40,214 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback.xml] at [file:/home/admin/canal-server/conf/logback.xml] 2025-06-11 11:54:40.324 | 03:54:40,324 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender] 2025-06-11 11:54:40.330 | 03:54:40,330 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [STDOUT] 2025-06-11 11:54:40.337 | 03:54:40,337 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [encoder] property 2025-06-11 11:54:40.372 | 03:54:40,372 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to DEBUG 2025-06-11 11:54:40.372 | 03:54:40,372 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [STDOUT] to Logger[ROOT] 2025-06-11 11:54:40.372 | 03:54:40,372 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration. 2025-06-11 11:54:40.374 | 03:54:40,373 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@47fd17e3 - Registering current configuration as safe fallback point 2025-06-11 11:54:40.410 | 2025-06-11 03:54:40.406 [main] INFO c.a.o.canal.deployer.CanalLauncher - ## set default uncaught exception handler 2025-06-11 11:54:40.410 | 2025-06-11 03:54:40.410 [main] INFO c.a.o.canal.deployer.CanalLauncher - ## load canal configurations 2025-06-11 11:54:40.434 | 2025-06-11 03:54:40.433 [main] ERROR c.a.o.canal.deployer.CanalLauncher - ## Something goes wrong when starting up the canal Server: 2025-06-11 11:54:40.434 | java.lang.NullPointerException: null 2025-06-11 11:54:40.434 | at com.alibaba.otter.canal.deployer.CanalStarter.start(CanalStarter.java:69) 2025-06-11 11:54:40.434 | at com.alibaba.otter.canal.deployer.CanalLauncher.main(CanalLauncher.java:124)
最新发布
06-13
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值