{"id":432,"date":"2020-05-06T18:07:48","date_gmt":"2020-05-06T10:07:48","guid":{"rendered":"https:\/\/blog.humh.cn\/?p=432"},"modified":"2020-05-06T18:11:18","modified_gmt":"2020-05-06T10:11:18","slug":"%e8%a7%a3%e5%86%b3%e6%89%a7%e8%a1%8c%e8%87%aa%e5%ae%9a%e4%b9%89%e8%84%9a%e6%9c%ac%e8%bf%87%e7%a8%8b%e4%b8%adbad-interpreter-no-such-file-or-directory%e7%9a%84%e5%bc%82%e5%b8%b8","status":"publish","type":"post","link":"https:\/\/blog.humh.cn\/?p=432","title":{"rendered":"\u89e3\u51b3\u6267\u884c\u81ea\u5b9a\u4e49\u811a\u672c\u8fc7\u7a0b\u4e2d\u201cbad interpreter: No such file or directory\u201d\u7684\u5f02\u5e38"},"content":{"rendered":"\n<h3>\u95ee\u9898\u53d1\u73b0<\/h3>\n\n\n\n<p>\u5f53\u5728windows\u5e73\u53f0\u4e2d\u7f16\u5199\u4e86\u4e00\u4e2a\u81ea\u5b9a\u4e49\u7684shell\u811a\u672c\u540e\uff0c\u76f4\u63a5copy\u5230Linux\u7cfb\u7edf\u4e2d\u6267\u884c\u65f6\u62a5\u9519\u201c<strong>bad interpreter: No such file or directory<\/strong>\u201d\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/file.blog.humh.cn\/2020\/05\/\u56fe\u7247.png\"><img width=\"573\" height=\"43\" class=\"wp-image-433 lazyload\" title=\"\u89e3\u51b3\u6267\u884c\u81ea\u5b9a\u4e49\u811a\u672c\u8fc7\u7a0b\u4e2d\u201cbad interpreter: No such file or directory\u201d\u7684\u5f02\u5e38\" src=\"data:image\/gif;base64,R0lGODlhAgABAIAAALGxsQAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==\" data-src=\"https:\/\/file.blog.humh.cn\/2020\/05\/\u56fe\u7247.png\" alt=\"https:\/\/file.blog.humh.cn\/2020\/05\/\u56fe\u7247.png\" data-srcset=\"https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/05\/\u56fe\u7247.png 573w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/05\/\u56fe\u7247-300x23.png 300w\" sizes=\"(max-width: 573px) 100vw, 573px\"><\/a><\/figure><\/div>\n\n\n\n<h3>\u539f\u56e0\u5206\u6790<\/h3>\n\n\n\n<p>\u53ef\u4ee5\u4ece\u62a5\u9519\u4fe1\u606f\u4e2d\u770b\u5230\uff0c\u5728\u6211\u4eec\u201c\/bin\/bash\u201d\u540e\u8ddf\u4e86\u4e2a\u201c<strong>^M<\/strong>\u201d\uff0c\u4f46\u6211\u4eec\u5e76\u6ca1\u6709\u7f16\u5199\u65f6\u5e76\u6ca1\u6709\u8be5\u5b57\u7b26\uff0c<strong>vim<\/strong>\u7f16\u8f91\u4e5f\u770b\u4e0d\u5230\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/file.blog.humh.cn\/2020\/05\/\u56fe\u7247-1.png\"><img width=\"103\" height=\"44\" class=\"wp-image-434 lazyload\" title=\"\u89e3\u51b3\u6267\u884c\u81ea\u5b9a\u4e49\u811a\u672c\u8fc7\u7a0b\u4e2d\u201cbad interpreter: No such file or directory\u201d\u7684\u5f02\u5e38\" src=\"data:image\/gif;base64,R0lGODlhAgABAIAAALGxsQAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==\" data-src=\"https:\/\/file.blog.humh.cn\/2020\/05\/\u56fe\u7247-1.png\" alt=\"https:\/\/file.blog.humh.cn\/2020\/05\/\u56fe\u7247-1.png\"><\/a><\/figure><\/div>\n\n\n\n<p><strong>cat<\/strong> \u4e5f\u770b\u4e0d\u5230\u3002\u4e00\u5934\u96fe\u6c34\uff0c\u7ecf\u9762\u5411\u641c\u7d22\u5f15\u64ce\u540e\uff0c\u53d1\u73b0\u201c<strong>^<\/strong>\u201d\u5b9e\u5219\u4e3aUnix\u4e0b\u7684\u63a7\u5236\u5b57\u7b26\u63d2\u5165\u7b26\u53f7\uff0c\u800c\u201c<strong>M<\/strong>\u201d\u4e3a\u56de\u8f66\u7b26\uff08\\r\uff0cCR\uff09\u7ecfASCII\u7f16\u7801\u8f6c\u4e49\u540e\u7684\u5b57\u7b26\uff08\u8c8c\u4f3c\uff0c\u662f\u201c\\r\u201d\u5341\u516d\u8fdb\u5236\u8868\u793a+64\u8f6c\u6362\u4e3aASCII\u7801\u8868\u793a\u540e\u7684\u7ed3\u679c\uff0c\u66f4\u5177\u4f53\u6211\u4e5f\u6ca1\u7406\u89e3\u3002\u3002\u5f85\u8003\u7a76\uff09\u3002\u4f46\u5176\u5b9eUnix\u7cfb\u7edf\u4e2d\u662f\u4e0d\u9700\u8981\u56de\u8f66\u7b26\u7684\u3002\u6211\u4eec\u5728windows\u7cfb\u7edf\u4e2d\uff0c\u9ed8\u8ba4\u6362\u884c\u65f6\uff0c\u90fd\u4f1a\u5728\u5176\u6700\u540e\u52a0\u5165\u201c\\r\\n\u201d\uff0c\u5373\u56de\u8f66\u6362\u884c\uff08CRLF\uff09\u3002\u4f46Unix\u7cfb\u7edf\u4e2d\u53ea\u9700\u8981\u201c\\n\u201d\u5373\u53ef\u4ee5\u6362\u884c\u3002\u8fd9\u4e5f\u5c31\u5bfc\u81f4\u4e86\u6211\u4eec\u7ecf\u5e38\u5728windows\u4e0b\u7f16\u5199\u7684\u6587\u4ef6\u76f4\u63a5\u653e\u5230Linux\u7cfb\u7edf\u4e2d\u6267\u884c\u9519\u8bef\u7684\u539f\u56e0\u3002<\/p>\n\n\n\n<p>\u50cf\u8fd9\u79cd\u7b26\u53f7\uff0c\u5728vim\u53ca\u9ed8\u8ba4cat\u4e2d\u662f\u770b\u4e0d\u5230\u7684\uff0c\u8981\u60f3\u770b\u5230\u53ef\u4ee5 <code>cat -v<\/code>\uff08\u6216\u8005-e\uff0c-t\uff09\u4e09\u4e2a\u53c2\u6570\u5747\u53ef\u4ee5\u663e\u793a\u51fa\u975e\u6253\u5370\u5b57\u7b26\uff0c\u53ef\u4ee5\u663e\u793a\u90a3\u4e9b\u4e0d\u53ef\u89c1\u7684\u5b57\u7b26\u96c6\uff0c\u5f53\u7136\u4e09\u4e2a\u53c2\u6570\u6709\u7565\u5fae\u4e0d\u540c\uff0c\u4e3b\u8981\u4e3a\u80fd\u663e\u793a\u51fa\u7684\u4e0d\u540c\u5b57\u7b26\u96c6\u8303\u56f4\u4e0d\u540c\u3002\u5982\u4e0b\u4e3a<code>cat -v<\/code>\u770b\u5230\u7684\u7ed3\u679c\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/file.blog.humh.cn\/2020\/05\/\u56fe\u7247-2.png\"><img width=\"390\" height=\"49\" class=\"wp-image-435 lazyload\" title=\"\u89e3\u51b3\u6267\u884c\u81ea\u5b9a\u4e49\u811a\u672c\u8fc7\u7a0b\u4e2d\u201cbad interpreter: No such file or directory\u201d\u7684\u5f02\u5e38\" src=\"data:image\/gif;base64,R0lGODlhAgABAIAAALGxsQAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==\" data-src=\"https:\/\/file.blog.humh.cn\/2020\/05\/\u56fe\u7247-2.png\" alt=\"https:\/\/file.blog.humh.cn\/2020\/05\/\u56fe\u7247-2.png\" data-srcset=\"https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/05\/\u56fe\u7247-2.png 390w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/05\/\u56fe\u7247-2-300x38.png 300w\" sizes=\"(max-width: 390px) 100vw, 390px\"><\/a><\/figure><\/div>\n\n\n\n<p>\u53ef\u4ee5\u663e\u793a\u51fa\u4e0d\u53ef\u89c1\u7684\u201c^M\u201d\u3002<br>\u540c\u65f6\u6211\u4eec<strong>file<\/strong>\u67e5\u770b\u6587\u4ef6\u4fe1\u606f\uff0c\u5982<code>file nginx_rtmp.sh<\/code>\u5982\u4e0b\u7ed3\u679c\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/file.blog.humh.cn\/2020\/05\/\u56fe\u7247-3.png\"><img width=\"651\" height=\"44\" class=\"wp-image-436 lazyload\" title=\"\u89e3\u51b3\u6267\u884c\u81ea\u5b9a\u4e49\u811a\u672c\u8fc7\u7a0b\u4e2d\u201cbad interpreter: No such file or directory\u201d\u7684\u5f02\u5e38\" src=\"data:image\/gif;base64,R0lGODlhAgABAIAAALGxsQAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==\" data-src=\"https:\/\/file.blog.humh.cn\/2020\/05\/\u56fe\u7247-3.png\" alt=\"https:\/\/file.blog.humh.cn\/2020\/05\/\u56fe\u7247-3.png\" data-srcset=\"https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/05\/\u56fe\u7247-3.png 651w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/05\/\u56fe\u7247-3-300x20.png 300w\" sizes=\"(max-width: 651px) 100vw, 651px\"><\/a><\/figure><\/div>\n\n\n\n<p>\u53ef\u4ee5\u770b\u5230\uff0c\u6587\u4ef6\u4e2d\u5b58\u5728CRLF\u7684\u6362\u884c\u65b9\u5f0f\u3002<\/p>\n\n\n\n<h3>\u89e3\u51b3\u65b9\u6848<\/h3>\n\n\n\n<h4>1\u3001vim\u91cd\u65b0\u7f16\u5199<\/h4>\n\n\n\n<p>\u53ef\u4ee5Linux\u4e0b\u65b0\u5efa\u4e00\u4e2a\u6587\u4ef6\uff0c\u91cd\u65b0<strong>vim<\/strong>\u76f4\u63a5\u7f16\u5199\u811a\u672c\u5185\u5bb9\u5373\u53ef\u3002\u5f53\u7136\u3002\u3002\u3002\u9ebb\u70e6\u3002\u3002<\/p>\n\n\n\n<h4>2\u3001windows\u4e0b\u8c03\u6574\u6362\u884c<\/h4>\n\n\n\n<p>\u5f53\u7136\u8fd9\u79cd\u65b9\u5f0f\u4ec5\u9488\u5bf9\u6362\u884c\u7b26\u95ee\u9898\u7684\u60c5\u51b5\uff0c\u5982\u679c\u8fd8\u6709\u5176\u4ed6\u7279\u6b8a\u5b57\u7b26\u4e0d\u540c\u7cfb\u7edf\u517c\u5bb9\u95ee\u9898\uff0c\u53e6\u505a\u8003\u8651\u3002<br>\u8fd9\u91cc\u6211\u7684\u811a\u672c\u662f\u901a\u8fc7IDEA\u8fdb\u884c\u7f16\u5199\u7684\uff0c\u53ef\u4ee5\u5728\u7f16\u5199\u65f6\u9009\u62e9\u6362\u884c\u65b9\u5f0f\uff0cIDEA\u652f\u6301\u4e0d\u540c\u7684\u7cfb\u7edf\u6a21\u5f0f\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/file.blog.humh.cn\/2020\/05\/\u56fe\u7247-4.png\"><img width=\"315\" height=\"110\" class=\"wp-image-437 lazyload\" title=\"\u89e3\u51b3\u6267\u884c\u81ea\u5b9a\u4e49\u811a\u672c\u8fc7\u7a0b\u4e2d\u201cbad interpreter: No such file or directory\u201d\u7684\u5f02\u5e38\" src=\"data:image\/gif;base64,R0lGODlhAgABAIAAALGxsQAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==\" data-src=\"https:\/\/file.blog.humh.cn\/2020\/05\/\u56fe\u7247-4.png\" alt=\"https:\/\/file.blog.humh.cn\/2020\/05\/\u56fe\u7247-4.png\" data-srcset=\"https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/05\/\u56fe\u7247-4.png 315w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/05\/\u56fe\u7247-4-300x105.png 300w\" sizes=\"(max-width: 315px) 100vw, 315px\"><\/a><\/figure><\/div>\n\n\n\n<p>Notepad++\u4e5f\u652f\u6301<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/file.blog.humh.cn\/2020\/05\/\u56fe\u7247-5.png\"><img width=\"595\" height=\"592\" class=\"wp-image-438 lazyload\" title=\"\u89e3\u51b3\u6267\u884c\u81ea\u5b9a\u4e49\u811a\u672c\u8fc7\u7a0b\u4e2d\u201cbad interpreter: No such file or directory\u201d\u7684\u5f02\u5e38\" src=\"data:image\/gif;base64,R0lGODlhAgABAIAAALGxsQAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==\" data-src=\"https:\/\/file.blog.humh.cn\/2020\/05\/\u56fe\u7247-5.png\" alt=\"https:\/\/file.blog.humh.cn\/2020\/05\/\u56fe\u7247-5.png\" data-srcset=\"https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/05\/\u56fe\u7247-5.png 595w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/05\/\u56fe\u7247-5-300x298.png 300w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/05\/\u56fe\u7247-5-150x150.png 150w\" sizes=\"(max-width: 595px) 100vw, 595px\"><\/a><\/figure><\/div>\n\n\n\n<p>\u5e94\u8be5\u5927\u591a\u6570\u7f16\u8f91\u5668\u90fd\u662f\u5177\u6709\u7c7b\u4f3c\u529f\u80fd\u7684\u3002<\/p>\n\n\n\n<h4>3\u3001Shell\u547d\u4ee4<\/h4>\n\n\n\n<p><strong> dos2unix<\/strong>\u662f\u5c06Windows\u683c\u5f0f\u6587\u4ef6\u8f6c\u6362\u4e3aUnix\u7684\u5de5\u5177\uff0c\u76f4\u63a5\u5982\uff1ados2unix \u540e\u8ddf\u4f60\u7684\u6587\u4ef6\u540d \u5373\u53ef\u5b9e\u73b0\u81ea\u52a8\u8f6c\u6362\u3002\u975e\u5e38\u65b9\u4fbf\uff01\uff01 <code>yum install -y dos2unix<\/code>\u5373\u53efCentOS\u4e0b\u5b89\u88c5dos2unix\uff08\u5176\u4ed6\u53d1\u884c\u7248\u7c7b\u4f3c\uff09\u3002\u5b9e\u9645\u6548\u679c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/file.blog.humh.cn\/2020\/05\/\u56fe\u7247-6.png\"><img width=\"420\" height=\"37\" class=\"wp-image-439 lazyload\" title=\"\u89e3\u51b3\u6267\u884c\u81ea\u5b9a\u4e49\u811a\u672c\u8fc7\u7a0b\u4e2d\u201cbad interpreter: No such file or directory\u201d\u7684\u5f02\u5e38\" src=\"data:image\/gif;base64,R0lGODlhAgABAIAAALGxsQAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==\" data-src=\"https:\/\/file.blog.humh.cn\/2020\/05\/\u56fe\u7247-6.png\" alt=\"https:\/\/file.blog.humh.cn\/2020\/05\/\u56fe\u7247-6.png\" data-srcset=\"https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/05\/\u56fe\u7247-6.png 420w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/05\/\u56fe\u7247-6-300x26.png 300w\" sizes=\"(max-width: 420px) 100vw, 420px\"><\/a><\/figure><\/div>\n\n\n\n<p>\u5177\u4f53\u5173\u4e8e<strong>dos2unix<\/strong>\u7684\u4f7f\u7528\u53ca\u539f\u7406\uff0c\u53ef\u81ea\u884c\u767e\u5ea6\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><a href=\"https:\/\/file.blog.humh.cn\/2020\/05\/\u56fe\u7247-7.png\"><img width=\"467\" height=\"36\" class=\"wp-image-440 lazyload\" title=\"\u89e3\u51b3\u6267\u884c\u81ea\u5b9a\u4e49\u811a\u672c\u8fc7\u7a0b\u4e2d\u201cbad interpreter: No such file or directory\u201d\u7684\u5f02\u5e38\" src=\"data:image\/gif;base64,R0lGODlhAgABAIAAALGxsQAAACH5BAAAAAAALAAAAAACAAEAAAICBAoAOw==\" data-src=\"https:\/\/file.blog.humh.cn\/2020\/05\/\u56fe\u7247-7.png\" alt=\"https:\/\/file.blog.humh.cn\/2020\/05\/\u56fe\u7247-7.png\" data-srcset=\"https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/05\/\u56fe\u7247-7.png 467w, https:\/\/file.blog.humh.cn\/wp-content\/uploads\/2020\/05\/\u56fe\u7247-7-300x23.png 300w\" sizes=\"(max-width: 467px) 100vw, 467px\"><\/a><\/figure><\/div>\n\n\n\n<p>\u53ef\u4ee5\u518d\u6b21<code>file<\/code>\u6216\u8005<code>cat -v<\/code>\u53ef\u4ee5\u53d1\u73b0\u5df2\u4e0d\u5b58\u5728\u201c<strong>\\r<\/strong>\u201d\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator\" \/>\n\n\n\n<p><strong>\u76f8\u5173\u53c2\u8003\uff1a<\/strong><br><a href=\"https:\/\/www.cnblogs.com\/kerrycode\/archive\/2015\/12\/22\/5065356.html\">https:\/\/www.cnblogs.com\/kerrycode\/archive\/2015\/12\/22\/5065356.html<\/a><br><a href=\"https:\/\/www.linuxidc.com\/Linux\/2018-10\/154724.htm\">https:\/\/www.linuxidc.com\/Linux\/2018-10\/154724.htm<\/a><br><a href=\"https:\/\/www.cnblogs.com\/kerrycode\/p\/5077969.html\">https:\/\/www.cnblogs.com\/kerrycode\/p\/5077969.html<\/a> <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u95ee\u9898\u53d1\u73b0 \u5f53\u5728windows\u5e73\u53f0\u4e2d\u7f16\u5199\u4e86\u4e00\u4e2a\u81ea\u5b9a\u4e49\u7684shell\u811a\u672c\u540e\uff0c\u76f4\u63a5copy\u5230Linux\u7cfb\u7edf\u4e2d\u6267\u884c\u65f6\u62a5\u9519 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[53],"tags":[31,70],"_links":{"self":[{"href":"https:\/\/blog.humh.cn\/index.php?rest_route=\/wp\/v2\/posts\/432"}],"collection":[{"href":"https:\/\/blog.humh.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.humh.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.humh.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.humh.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=432"}],"version-history":[{"count":2,"href":"https:\/\/blog.humh.cn\/index.php?rest_route=\/wp\/v2\/posts\/432\/revisions"}],"predecessor-version":[{"id":442,"href":"https:\/\/blog.humh.cn\/index.php?rest_route=\/wp\/v2\/posts\/432\/revisions\/442"}],"wp:attachment":[{"href":"https:\/\/blog.humh.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=432"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.humh.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=432"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.humh.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=432"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}