CentOS 7へのiModのインストール

CentOS 7へのiModのインストール

私は私のために多くのものをインストールするためにシェルスクリプトを作成しようとしています。 iMode(iMod)もその一つです。 iModの自己インストールシェルスクリプトを見つけ、bashコンソールで次のコマンドを実行しました。

export IMOD_VERSION=4.11.12
export CUDA_VERSION=10.1
wget https://bio3d.colorado.edu/imod/AMD64-RHEL5/imod_${IMOD_VERSION}_RHEL7-64_CUDA${CUDA_VERSION}.sh
sudo sh imod_${IMOD_VERSION}_RHEL7-64_CUDA${CUDA_VERSION}.sh

ノート

デバイスを再起動し、接続を切断して再接続しても問題は解決しません(SSH経由で新しい端末を起動します)。

インストール出力

$ export IMOD_VERSION=4.11.12
$ export CUDA_VERSION=10.1
$ wget https://bio3d.colorado.edu/imod/AMD64-RHEL5/imod_${IMOD_VERSION}_RHEL7-64_CUDA${CUDA_VERSION}.sh
--2022-02-02 03:16:12--  https://bio3d.colorado.edu/imod/AMD64-RHEL5/imod_4.11.12_RHEL7-64_CUDA10.1.sh
Resolving bio3d.colorado.edu (bio3d.colorado.edu)... 128.138.72.88
Connecting to bio3d.colorado.edu (bio3d.colorado.edu)|128.138.72.88|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 205325213 (196M) [application/x-sh]
Saving to: ‘imod_4.11.12_RHEL7-64_CUDA10.1.sh.1’

100%[===================================================================================================================>] 205,325,213 5.60MB/s   in 38s

2022-02-02 03:16:51 (5.21 MB/s) - ‘imod_4.11.12_RHEL7-64_CUDA10.1.sh.1’ saved [205325213/205325213]

$ sudo sh imod_4.11.12_RHEL7-64_CUDA10.1.sh

This script will install IMOD in /usr/local and rename
any previous version, or remove another copy of this version.

It will copy IMOD-linux.csh and IMOD-linux.sh to /etc/profile.d

You can add the option -h to see a full list of options

Enter Y if you want to proceed: y
Extracting imod_4.11.12_RHEL7-64_CUDA10.1.tar.gz ...
Extracting installIMOD
Checking system and package types
Saving the Plugins directory in the existing installation
Removing link to previous version but leaving previous version
Removing an existing copy of the same version...
Unpacking IMOD in /usr/local ...
Linking imod_4.11.12 to IMOD
Restoring the Plugins directory
Copying startup scripts to /etc/profile.d: IMOD-linux.csh IMOD-linux.sh

SELinux is enabled - Trying to change security context of libraries.

The installation of IMOD 4.11.12 is complete.
You may need to start a new terminal window for changes to take effect

If there are version-specific IMOD startup commands in individual user
 startup files (.cshrc, .bashrc, .bash_profile) they should be changed
 or removed.

Cleaning up imod_4.11.12_RHEL7-64_CUDA10.1.tar.gz, installIMOD, and IMODtempDir

ベストアンサー1

あなたの問題を再現するのに時間を費やしました。

在庫 CentOS 7.9 最小。

それから:

export IMOD_VERSION=4.11.12
export CUDA_VERSION=10.1
wget https://bio3d.colorado.edu/imod/AMD64-RHEL5/imod_${IMOD_VERSION}_RHEL7-64_CUDA${CUDA_VERSION}.sh
sudo sh imod_${IMOD_VERSION}_RHEL7-64_CUDA${CUDA_VERSION}.sh

出力:

This script will install IMOD in /usr/local and rename
any previous version, or remove another copy of this version.

It will copy IMOD-linux.csh and IMOD-linux.sh to /etc/profile.d

You can add the option -h to see a full list of options

Enter Y if you want to proceed: Y
Extracting imod_4.11.12_RHEL7-64_CUDA10.1.tar.gz ...
Extracting installIMOD
Checking system and package types
Unpacking IMOD in /usr/local ...
Linking imod_4.11.12 to IMOD
Copying startup scripts to /etc/profile.d: IMOD-linux.csh IMOD-linux.sh

SELinux is enabled - Trying to change security context of libraries.

The installation of IMOD 4.11.12 is complete.
You may need to start a new terminal window for changes to take effect

If there are version-specific IMOD startup commands in individual user
 startup files (.cshrc, .bashrc, .bash_profile) they should be changed
 or removed.

Cleaning up imod_4.11.12_RHEL7-64_CUDA10.1.tar.gz, installIMOD, and IMODtempDir

インストールスクリプトは、次の場所にソフトウェアをインストールするように見えます/usr/local/IMOD

[test@centos7test ~]$ ll /usr/local/
total 0
<...>
lrwxrwxrwx.  1 root root  12 Feb  3 10:31 IMOD -> imod_4.11.12
drwxr-xr-x. 13 1095  111 286 Nov 19 12:32 imod_4.11.12
<...>

次のコードスニペットをインストールする必要があるため、シェルからログアウトしてログインすることが非常に重要です/etc/profile.d/IMOD-linux.sh

<...>
export IMOD_DIR=${IMOD_DIR:=/usr/local/IMOD}

# Put the IMOD programs on the path
#
if ! echo ${PATH} | grep -q "$IMOD_DIR/bin" ; then
    export PATH=$IMOD_DIR/bin:$PATH
fi
<...>

これは現在の$PATH環境変数に反映されます。

[test@centos7test ~]# echo $PATH
/usr/local/IMOD/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin

imodこれで、バイナリを正常に検索して実行できますimodhelp

[test@centos7test local]# whereis imod imodhelp
imod: /usr/local/imod_4.11.12/bin/imod
imodhelp: /usr/local/imod_4.11.12/bin/imodhelp

何らかの理由でコンピュータが以下のファイルを選択できない場合は、/etc/profile.d/IMOD-linux.sh次のように強制できます。

[test@centos7test ~]# source /etc/profile.d/IMOD-linux.sh

おすすめ記事