error while loading shared libraries: libgsl.so.27: cannot open shared object

小鲨鱼2018發表於2024-04-21

001、問題

(base) [root@pc1 src]# treemix
treemix: error while loading shared libraries: libgsl.so.27: cannot open shared object file: No such file or directory

002、查詢該共享庫

(base) [root@pc1 src]# find / -name "libgsl.so.27"       ## 說明已經安裝
/home/software/gsl-2.7.1/.libs/libgsl.so.27
/usr/local/lib/libgsl.so.27

003、 檢視 LD_LIBRARY_PATH 環境變數

(base) [root@pc1 src]# echo $LD_LIBRARY_PATH   ## 沒有包含庫所在的路徑
/opt/rh/devtoolset-11/root/usr/lib64:/opt/rh/devtoolset-11/root/usr/lib:/opt/rh/devtoolset-11/root/usr/lib64/dyninst:/opt/rh/devtoolset-11/root/usr/lib/dyninst

004、修改 LD_LIBRARY_PATH環境變數

(base) [root@pc1 src]# export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

005、檢視此時的LD_LIBRARY_PATH環境變數

(base) [root@pc1 src]# echo $LD_LIBRARY_PATH   ## 說明LD_LIBRARY_PATH 環境變數修改成功

006、測試treeMix軟體

(base) [root@pc1 src]# treemix        ## 報錯消失

TreeMix v. 1.13
$Revision: 231 $

Options:
-h display this help
-i [file name] input file
-o [stem] output stem (will be [stem].treeout.gz, [stem].cov.gz, [stem].modelcov.gz)
-k [int] number of SNPs per block for estimation of covariance matrix (1)
-global Do a round of global rearrangements after adding all populations
-tf [file name] Read the tree topology from a file, rather than estimating it
-m [int] number of migration edges to add (0)
-root [string] comma-delimited list of populations to set on one side of the root (for migration)
-g [vertices file name] [edges file name] read the graph from a previous TreeMix run
-se Calculate standard errors of migration weights (computationally expensive)

相關文章