安裝軟體的路徑錯誤 - Linux

By Zenobia
at 2014-01-27T10:26
at 2014-01-27T10:26
Table of Contents
以下是soem大的回應
還有我的問題
(徵得soem大同意附上)
※ 引述《flied (libertines)》之銘言:
: ※ 引述《soem (流水)》之銘言:
: : 這應該就是可以直接call得到talys指令了
: : 這是之前的文章
: : 這是後來你執行的狀況
: : 請注意妳現在的所在目錄,
: : 比對兩次結果,你是不是該去 ~/physics/talys/samples 尋找你的verify
: : 雖然不知道為甚麼你會在/bin裡面,姑且推論一下你的想法好了:
: : 1. 你可能認為執行檔要在/bin底下才能跑?
: : => 實際上不用,跟檔案權限有關系
: : 但要注意的是,如果你要執行的不是在系統$PATH裡面的程式,
: : 要用相對或絕對路徑的方式去呼叫。
: : 像是你在 ~/physics/talys/samples裡面呼叫相對路徑 "./":
: : ~/physics/talys/samples$ ./verify
: : 或是絕對路徑
: : /home/你的帳號/physics/talys/samples/verify
: : 若是你直接呼叫verify,就是呼叫到系統預先有的那隻verify工具。
: : 2. 你可能不確定chmod的功能以及"bash: ./verify: 拒絕不符權限的操作"的成因
: : => 首先無論是script或程式一般來說都需要檔案權限才能執行;
: : 這邊的權現有兩個面向:你的權限,和設定給檔案的權限。
: : 我們先來看看一般權限的呈現方式:
: : $ ls -ld /bin/bash
: : -rwxr-xr-x 1 root root 959120 Mar 29 2013 /bin/bash
: : 第一組rwx是這個檔案的擁有者root所能做的事情
: : read, write, execute
: : 第二組rwx是這個檔案的擁有者群組,root群組所能做的事情
: : 所以有在root群組且非使用者root則會參考這組設定
: : 第三組rwx則是除此以外的人的權限。
: : 所以說,我們可以看到/bin/bash這個檔案,
: : - 擁有者root具有所有權限;
: : - 擁有者群組root沒有修改(寫入)的權限,但可以讀取和執行;
: : - 剩下的人亦是沒有修改、有讀取執行的權限。
: : 一般的文字檔案類型往往是644,例如:
: : $ ls -ld /etc/hosts
: : -rw-r--r-- 1 root root 342 Jan 22 20:16 /etc/hosts
: : 我想你的~/physics/talys/samples/verify應該也是類似的情形,
: : 因此你需要的是幫他加上execute
: : ~/physics/talys/samples/$ chmod +x verify
: : sudo 可以幫你取得不同使用者的權限,但針對x這項設定通常需要用chmod來調整。
: 謝謝
: 我執行了這行成功
: lee@lee-X402CA:~/physics/talys/samples$ ./verify
: bash: ./verify: 拒絕不符權限的操作
: lee@lee-X402CA:~/physics/talys/samples$ chmod +x verify
: lee@lee-X402CA:~/physics/talys/samples$ ./verify
: /home/lee/physics/talys/samples/17/a/new
: /home/lee/physics/talys/samples/17/b/new
: /home/lee/physics/talys/samples/17/c/new
: /home/lee/physics/talys/samples/11/new
: /home/lee/physics/talys/samples/10/a/new
: /home/lee/physics/talys/samples/10/b/new
: /home/lee/physics/talys/samples/20/new
: /home/lee/physics/talys/samples/1/f/new
: /home/lee/physics/talys/samples/1/g/new
: /home/lee/physics/talys/samples/1/e/new
: /home/lee/physics/talys/samples/1/h/new
: /home/lee/physics/talys/samples/1/a/new
: /home/lee/physics/talys/samples/1/b/new
: /home/lee/physics/talys/samples/1/d/new
: /home/lee/physics/talys/samples/1/i/new
: /home/lee/physics/talys/samples/1/c/new
: /home/lee/physics/talys/samples/8/new
: /home/lee/physics/talys/samples/21/new
: /home/lee/physics/talys/samples/3/a/new
: /home/lee/physics/talys/samples/3/b/new
: /home/lee/physics/talys/samples/3/d/new
: /home/lee/physics/talys/samples/3/c/new
: /home/lee/physics/talys/samples/22/new
: /home/lee/physics/talys/samples/9/new
: /home/lee/physics/talys/samples/6/a/new
: /home/lee/physics/talys/samples/6/b/new
: /home/lee/physics/talys/samples/19/new
: /home/lee/physics/talys/samples/16/a/new
: /home/lee/physics/talys/samples/16/b/new
: /home/lee/physics/talys/samples/16/d/new
: /home/lee/physics/talys/samples/16/c/new
: /home/lee/physics/talys/samples/2/new
: /home/lee/physics/talys/samples/24/new
: /home/lee/physics/talys/samples/25/new
: /home/lee/physics/talys/samples/12/new
: /home/lee/physics/talys/samples/23/new
: /home/lee/physics/talys/samples/14/new
: /home/lee/physics/talys/samples/5/new
: /home/lee/physics/talys/samples/15/new
: /home/lee/physics/talys/samples/18/a/new
: /home/lee/physics/talys/samples/18/b/new
: /home/lee/physics/talys/samples/4/a/new
: /home/lee/physics/talys/samples/4/b/new
: /home/lee/physics/talys/samples/13/new
: /home/lee/physics/talys/samples/7/new
: 似乎成功
: 但readme如下
: Verification
: ------------
: - cd samples
: - verify
: Under Linux/Unix, this should run all sample cases (about 1 hour on
: a fast PC).
: 我這大概3秒就結束
: 所以應該還沒有裝好
: : 這邊就只是你的系統有安裝一個叫做verify的指令,
: : 但這你的使用經驗看來,那個指令並不是你這次安裝的步驟中需要呼叫到的。
: Your own calculations
: ---------------------
: - talys < input > output
: where you can make your own input file starting from the many sample cases
: we provide.
: 我試著計算執行
: 錯誤如下
: lee@lee-X402CA:~/physics/talys/test$ talys input output5
soem:
先說這行:
$ talys < input > output
< :把檔案讀進stdin
> :把s
"如果"我沒有誤會他的readme的話,這行命令是:
1. 應該是要你準備個名叫input且符合他的格式的input檔案
2. 然後,會輸出結果到output檔案
格式的話,照他readme這句是他有提供一些sample可以參考。
不曉得你下面的input是不是有照這個方式呢?
(不過你得到的錯誤訊息是下面那件事情)
me:
我的input是直接從sample複製貼上到test資料夾
所以格式內容是一模一樣
: TALYS-error: Structure database not installed: change path in machine.f
: 我的machine.f 在 /home/lee/physics/talys/source
: https://www.dropbox.com/s/zmbhzustk6hnp6v/2014-01-26%2021%3A39%3A35.png
: 內容如下
: https://www.dropbox.com/s/yq6o4hbraqftuf6/2014-01-26%2021%3A32%3A21.png
因為我看不懂fortran所以只能用猜的...
他似乎是需要...嗯...可能是 home/structure/abundance/z001
那個home就是你改的變數,看看該路徑是不是有這個檔案。
有
https://www.dropbox.com/s/e46dmelae22v3jw/2014-01-27%2009%3A49%3A55.png
: c ********************* Set directory for structure data ***************
: c
: c path : directory containing structure files to be read
: c lenpath: length of pathname
: c
: c The maximum length of the path is 60 characters
: c
: home='/home/lee/physics/talys/' (我改這行)
: lenhome=0
: do 10 i=1,60
: if (home(i:i).eq.' ') goto 100
: lenhome=lenhome+1
: 10 continue
: 100 path=home(1:lenhome)//'structure/'
: lenpath=lenhome+10
: c
: c Test to check accessibility of structure files
: c
: inquire (file=path(1:lenpath)//'abundance/z001',exist=lexist)
: if (lexist) return
: write(*,'(" TALYS-error: Structure database not installed:",
: + " change path in machine.f")')
: stop
: end
: Copyright (C) 2013 A.J. Koning, S. Hilaire and S. Goriely
: 我改的只有這部份
: 原本是 home='.'
: 不能執行後,我改成
: home='/home/lee/physics/talys/'
: 這樣改對吧?
soem :
之前FedoraHanT給的hint中這行:
sed -i 's|/home/finux01b/akoning/talys/|.|' machine.f
就是把他換成 '.'
me: 所以原本的 home='.' 是對的?
但我改回
執行的錯誤一樣
TALYS-error: Structure database not installed: change path in machine.f
soem :
不過更重要的是,fortan是要重新compile的喔!
所以你改過之後也得重新compile出新的執行檔才有用。
me: 抱歉,我是超弱手,這邊要如何compile?
※ 編輯: flied 來自: 61.220.220.27 (01/27 10:53)
還有我的問題
(徵得soem大同意附上)
※ 引述《flied (libertines)》之銘言:
: ※ 引述《soem (流水)》之銘言:
: : 這應該就是可以直接call得到talys指令了
: : 這是之前的文章
: : 這是後來你執行的狀況
: : 請注意妳現在的所在目錄,
: : 比對兩次結果,你是不是該去 ~/physics/talys/samples 尋找你的verify
: : 雖然不知道為甚麼你會在/bin裡面,姑且推論一下你的想法好了:
: : 1. 你可能認為執行檔要在/bin底下才能跑?
: : => 實際上不用,跟檔案權限有關系
: : 但要注意的是,如果你要執行的不是在系統$PATH裡面的程式,
: : 要用相對或絕對路徑的方式去呼叫。
: : 像是你在 ~/physics/talys/samples裡面呼叫相對路徑 "./":
: : ~/physics/talys/samples$ ./verify
: : 或是絕對路徑
: : /home/你的帳號/physics/talys/samples/verify
: : 若是你直接呼叫verify,就是呼叫到系統預先有的那隻verify工具。
: : 2. 你可能不確定chmod的功能以及"bash: ./verify: 拒絕不符權限的操作"的成因
: : => 首先無論是script或程式一般來說都需要檔案權限才能執行;
: : 這邊的權現有兩個面向:你的權限,和設定給檔案的權限。
: : 我們先來看看一般權限的呈現方式:
: : $ ls -ld /bin/bash
: : -rwxr-xr-x 1 root root 959120 Mar 29 2013 /bin/bash
: : 第一組rwx是這個檔案的擁有者root所能做的事情
: : read, write, execute
: : 第二組rwx是這個檔案的擁有者群組,root群組所能做的事情
: : 所以有在root群組且非使用者root則會參考這組設定
: : 第三組rwx則是除此以外的人的權限。
: : 所以說,我們可以看到/bin/bash這個檔案,
: : - 擁有者root具有所有權限;
: : - 擁有者群組root沒有修改(寫入)的權限,但可以讀取和執行;
: : - 剩下的人亦是沒有修改、有讀取執行的權限。
: : 一般的文字檔案類型往往是644,例如:
: : $ ls -ld /etc/hosts
: : -rw-r--r-- 1 root root 342 Jan 22 20:16 /etc/hosts
: : 我想你的~/physics/talys/samples/verify應該也是類似的情形,
: : 因此你需要的是幫他加上execute
: : ~/physics/talys/samples/$ chmod +x verify
: : sudo 可以幫你取得不同使用者的權限,但針對x這項設定通常需要用chmod來調整。
: 謝謝
: 我執行了這行成功
: lee@lee-X402CA:~/physics/talys/samples$ ./verify
: bash: ./verify: 拒絕不符權限的操作
: lee@lee-X402CA:~/physics/talys/samples$ chmod +x verify
: lee@lee-X402CA:~/physics/talys/samples$ ./verify
: /home/lee/physics/talys/samples/17/a/new
: /home/lee/physics/talys/samples/17/b/new
: /home/lee/physics/talys/samples/17/c/new
: /home/lee/physics/talys/samples/11/new
: /home/lee/physics/talys/samples/10/a/new
: /home/lee/physics/talys/samples/10/b/new
: /home/lee/physics/talys/samples/20/new
: /home/lee/physics/talys/samples/1/f/new
: /home/lee/physics/talys/samples/1/g/new
: /home/lee/physics/talys/samples/1/e/new
: /home/lee/physics/talys/samples/1/h/new
: /home/lee/physics/talys/samples/1/a/new
: /home/lee/physics/talys/samples/1/b/new
: /home/lee/physics/talys/samples/1/d/new
: /home/lee/physics/talys/samples/1/i/new
: /home/lee/physics/talys/samples/1/c/new
: /home/lee/physics/talys/samples/8/new
: /home/lee/physics/talys/samples/21/new
: /home/lee/physics/talys/samples/3/a/new
: /home/lee/physics/talys/samples/3/b/new
: /home/lee/physics/talys/samples/3/d/new
: /home/lee/physics/talys/samples/3/c/new
: /home/lee/physics/talys/samples/22/new
: /home/lee/physics/talys/samples/9/new
: /home/lee/physics/talys/samples/6/a/new
: /home/lee/physics/talys/samples/6/b/new
: /home/lee/physics/talys/samples/19/new
: /home/lee/physics/talys/samples/16/a/new
: /home/lee/physics/talys/samples/16/b/new
: /home/lee/physics/talys/samples/16/d/new
: /home/lee/physics/talys/samples/16/c/new
: /home/lee/physics/talys/samples/2/new
: /home/lee/physics/talys/samples/24/new
: /home/lee/physics/talys/samples/25/new
: /home/lee/physics/talys/samples/12/new
: /home/lee/physics/talys/samples/23/new
: /home/lee/physics/talys/samples/14/new
: /home/lee/physics/talys/samples/5/new
: /home/lee/physics/talys/samples/15/new
: /home/lee/physics/talys/samples/18/a/new
: /home/lee/physics/talys/samples/18/b/new
: /home/lee/physics/talys/samples/4/a/new
: /home/lee/physics/talys/samples/4/b/new
: /home/lee/physics/talys/samples/13/new
: /home/lee/physics/talys/samples/7/new
: 似乎成功
: 但readme如下
: Verification
: ------------
: - cd samples
: - verify
: Under Linux/Unix, this should run all sample cases (about 1 hour on
: a fast PC).
: 我這大概3秒就結束
: 所以應該還沒有裝好
: : 這邊就只是你的系統有安裝一個叫做verify的指令,
: : 但這你的使用經驗看來,那個指令並不是你這次安裝的步驟中需要呼叫到的。
: Your own calculations
: ---------------------
: - talys < input > output
: where you can make your own input file starting from the many sample cases
: we provide.
: 我試著計算執行
: 錯誤如下
: lee@lee-X402CA:~/physics/talys/test$ talys input output5
soem:
先說這行:
$ talys < input > output
< :把檔案讀進stdin
> :把s
"如果"我沒有誤會他的readme的話,這行命令是:
1. 應該是要你準備個名叫input且符合他的格式的input檔案
2. 然後,會輸出結果到output檔案
格式的話,照他readme這句是他有提供一些sample可以參考。
不曉得你下面的input是不是有照這個方式呢?
(不過你得到的錯誤訊息是下面那件事情)
me:
我的input是直接從sample複製貼上到test資料夾
所以格式內容是一模一樣
: TALYS-error: Structure database not installed: change path in machine.f
: 我的machine.f 在 /home/lee/physics/talys/source
: https://www.dropbox.com/s/zmbhzustk6hnp6v/2014-01-26%2021%3A39%3A35.png

: https://www.dropbox.com/s/yq6o4hbraqftuf6/2014-01-26%2021%3A32%3A21.png

因為我看不懂fortran所以只能用猜的...
他似乎是需要...嗯...可能是 home/structure/abundance/z001
那個home就是你改的變數,看看該路徑是不是有這個檔案。
有
https://www.dropbox.com/s/e46dmelae22v3jw/2014-01-27%2009%3A49%3A55.png

: c ********************* Set directory for structure data ***************
: c
: c path : directory containing structure files to be read
: c lenpath: length of pathname
: c
: c The maximum length of the path is 60 characters
: c
: home='/home/lee/physics/talys/' (我改這行)
: lenhome=0
: do 10 i=1,60
: if (home(i:i).eq.' ') goto 100
: lenhome=lenhome+1
: 10 continue
: 100 path=home(1:lenhome)//'structure/'
: lenpath=lenhome+10
: c
: c Test to check accessibility of structure files
: c
: inquire (file=path(1:lenpath)//'abundance/z001',exist=lexist)
: if (lexist) return
: write(*,'(" TALYS-error: Structure database not installed:",
: + " change path in machine.f")')
: stop
: end
: Copyright (C) 2013 A.J. Koning, S. Hilaire and S. Goriely
: 我改的只有這部份
: 原本是 home='.'
: 不能執行後,我改成
: home='/home/lee/physics/talys/'
: 這樣改對吧?
soem :
之前FedoraHanT給的hint中這行:
sed -i 's|/home/finux01b/akoning/talys/|.|' machine.f
就是把他換成 '.'
me: 所以原本的 home='.' 是對的?
但我改回
執行的錯誤一樣
TALYS-error: Structure database not installed: change path in machine.f
soem :
不過更重要的是,fortan是要重新compile的喔!
所以你改過之後也得重新compile出新的執行檔才有用。
me: 抱歉,我是超弱手,這邊要如何compile?
※ 編輯: flied 來自: 61.220.220.27 (01/27 10:53)
Tags:
Linux
All Comments
Related Posts
整理照片 適合用liunx 嗎?

By Rosalind
at 2014-01-27T02:55
at 2014-01-27T02:55
安裝軟體的路徑錯誤

By Franklin
at 2014-01-26T21:40
at 2014-01-26T21:40
模組觀念

By Joe
at 2014-01-26T21:22
at 2014-01-26T21:22
安裝Ubuntu後開機找不到隨身碟

By Daniel
at 2014-01-26T19:05
at 2014-01-26T19:05
安裝軟體的路徑錯誤

By Carol
at 2014-01-26T10:46
at 2014-01-26T10:46