나는 나를 위해 많은 것들을 설치하기 위해 쉘 스크립트를 만들려고 노력하고 있습니다. 아이모드(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