日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > linux >内容正文

linux

linux导入函数包失败,使用qsub运行shellscript时出现apos;文件意外结束apos;和apos;错误导入函数定义apos;错误 中国服务器网...

發布時間:2025/4/16 linux 19 豆豆
生活随笔 收集整理的這篇文章主要介紹了 linux导入函数包失败,使用qsub运行shellscript时出现apos;文件意外结束apos;和apos;错误导入函数定义apos;错误 中国服务器网... 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

我有以下的shellcript:

#!/bin/sh cd /sw/local/bin/ export LD_LIBRARY_PATH=/sw/local/lib:/usr/local/Trolltech/Qt-4.7.2/lib:$LD_LIBRARY_PATH ./FeatureFinderRaw -in /homes/JG-C1-18.mzML -out /homes/test_remove_after_use.featureXML -threads 20

當我從我自己的命令行運行時,它工作正常,但是當我嘗試執行時:

qsub -q ningal.q -cwd -V -o /homes/queue.out -e /queue.err featureFind_C1-18_20t.sh

我得到以下錯誤:

/bin/sh: module: line 1: syntax error: unexpected end of file /bin/sh: error importing function definition for `module' ./FeatureFinderRaw: error while loading shared libraries: libOpenMS.so: cannot open shared object file: No such file or directory /bin/sh: module: line 1: syntax error: unexpected end of file /bin/sh: error importing function definition for `module' ./FeatureFinderRaw: error while loading shared libraries: libQtWebKit.so.4: cannot open shared object file: No such file or directory /bin/sh: module: line 1: syntax error: unexpected end of file /bin/sh: error importing function definition for `module' ./FeatureFinderRaw: error while loading shared libraries: libQtWebKit.so.4: cannot open shared object file: No such file or directory /bin/bash: module: line 1: syntax error: unexpected end of file /bin/bash: error importing function definition for `module' ./FeatureFinderRaw: error while loading shared libraries: libQtWebKit.so.4: cannot open shared object file: No such file or directory /bin/sh: module: line 1: syntax error: unexpected end of file /bin/sh: error importing function definition for `module' ./FeatureFinderRaw: error while loading shared libraries: libQtWebKit.so.4: cannot open shared object file: No such file or directory /bin/sh: module: line 1: syntax error: unexpected end of file /bin/sh: error importing function definition for `module'

我不明白為什么我在使用qsub時遇到這個錯誤,而不是在同一個群集機器上直接運行腳本。 我如何使用qsub運行腳本?

在使用的包裝腳本中也有這個問題

qsub -shell no -b yes -cwd -V somescript.bash arg1 arg2 etc

如果您使用它來提交另一個bash shell腳本。 它產生了annonying

/bin/sh: module: line 1: syntax error: unexpected end of file /bin/sh: error importing function definition for `BASH_FUNC_module'

(這是在CentOS 6.6上運行的Sun Grid Engine 211.11)通過簡單地將以下內容放在包裝腳本(而不是包裝腳本)之上,就可以解決問題:

unset module

就這樣。

在/ usr / share / modulees / init / bash中注釋掉了'export -f module'一行。

在正常的登錄shell中,modules.sh將從profile.d調用,所以module命令可用。 在一個非登錄shell中,就像一個應用程序包裝腳本,它只是首先獲取上述文件。

一般情況下,在采購上面的文件后的應用程序腳本,他們再次發出命令“模塊加載應用程序/供應商/應用程序”,這意味著額外的采購。

由于某種原因,我不知道在每行的末尾添加分號解決了問題。

最有可能的原因是,如果添加分號有所不同,最好使用DOS行結尾(\ r \ n)而不是POSIX行結尾(\ r)保存文件。

總結

以上是生活随笔為你收集整理的linux导入函数包失败,使用qsub运行shellscript时出现apos;文件意外结束apos;和apos;错误导入函数定义apos;错误 中国服务器网...的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。