/bin/bash^M: 坏的解释器: 没有那个文件或目录
[root@localhost java_api]# ./ctl microarch-sys-registry-0.0.1.jar
-bash: ./ctl: /bin/bash^M: 坏的解释器: 没有那个文件或目录
这个文件ctl是同事从win系统环境打包给我的,应该是win系统里编辑过,换行结尾是\n\r,但是在linux下是\n,所以会有多出来的\r,故此报错。
执行命令 sed -i 's/\r$//' ctl
会把ctl文件中的\r 替换成空白,符合linux运行环境。
再次启动,不再报错:
[root@localhost java_api]# ./ctl microarch-sys-registry-0.0.1.jar
程序已关闭 /data/java_api/microarch-sys-registry-0.0.1.jar
启动程序 /data/java_api/microarch-sys-registry-0.0.1.jar
[root@localhost java_api]# [INFO ] 10:30:11.847 [main] o.s.c.a.AnnotationConfigApplicationContext - Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@18ef96: startup date [Fri Aug 21 10:30:11 CST 2020]; root of context hierarchy
[INFO ] 10:30:12.138 [main] o.s.b.f.a.AutowiredAnnotationBeanPostProcessor - JSR-330 'javax.inject.Inject' annotation found and supported for autowiring
[INFO ] 10:30:12.207 [main] o.s.c.s.PostProcessorRegistrationDelegate$BeanPostProcessorChecker - Bean 'configurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$4a92d0bf] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
[INFO ] 10:30:12.279 [background-preinit] o.h.validator.internal.util.Version - HV000001: Hibernate Validator 5.3.6.Final
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v1.5.14.RELEASE)