내용

글번호 319
작성자 heojk
작성일 2017-01-10 13:34:16
제목 env /etc/init.d/xxx no such file or directory 에러
내용 service 명령을 실행시켰는데 env /etc/init.d/your_init_script no such file or directory 에러가 발생할 때 진단 : cat -v /etc/init.d/your_init_script Examine the output, looking for ^M at the end of each line. These are carriage return characters. 원인 : Carriage return characters have been inserted into your init script. Shell scripts may not be read correctly when unexpected carriage returns are encountered. Typically this might occur when the file was created via a Windows system, text editor, or terminal, as Windows uses carriage return + line feed characters for line endings, whereas *nix systems only use line feed characters 해결 방법 : Remove the carriage return characters from the init script. This can be done with a sed one-liner: sed -i -e 's/\r//g' /etc/init.d/your_init_script This will remove the carriage return characters, after which you can start the service successfully
첨부파일
service env error.png (40,095byte)