|||
在网上搜集了最新的在Ubuntu 10.04 上安装iraf 步骤,这里列出来供大家安装iraf参考。
IRAF
The version of iraf that we will install is v214. This one, unlike version v212 comes with the ecl terminal which allows autocompletion and using the up key to check previous commands.
Okay, so, to begin with, we will install the tcsh package (that's in the universe repository)
Next, we make a folder were all of the iraf downloads will go (in order to keep things neat). Please keep yourself in the same terminal:
Then, we download the iraf files. These are:
as.pcix.gen.gz, the architecture independent files
ib.lnux.x86.gz, the linux dependent base files
nb.lnux.x86.gz, the linux dependent noao files
In the download directions, the v214 folder could be replaced by a more recent version in case it exists:
Next, I make iraf's directory tree:
Next i add the iraf user (this will ask you many things. The only important one is the password, the rest could be left in blank. The user is added at the admin group so he can sudo when installing iraf):
And I move the downloaded files to the /iraf/iraf directory, and grant all permissions on the directories to the iraf user:
Now I login as the iraf user:
We extract the iraf files:
此时可能对不同的版本修改linux.7.2
And we remove the unneccesary files:
And we prepare things for the installation (from this point it is essential to keep the same terminal open until the end of the installation):
We first test the install, to do this we run (from the same terminal of the step before):
Prompting yes to everything should be enough. In any case, the proccess can get stuck in a loop where it asks if it should configure iraf-networking, fail at trying to configure it, and asking again. The error message you should receive is:
Having installed iraf successfully, you can exit from the iraf user's shell bi doing (closing the terminal will work too):
x11iraf
Next we install x11iraf which is needed for irafs graphical support. The version to be installed is 1.3.1, but this could be replaced for a newer one with no problem only by changing the download.
We download x11iraf files to our downloads folder:
We extract it and install it:
ds9
The proccess is simple, download the file, extract it, and copy and give write permission to the binary. We install with this version 5.6 of ds9, but just as in the other steps, this can easily be updated by changing the download address:
cd ~/iraf
wget http://hea-www.harvard.edu/saord/download/ds9/linux/ds9.linux.5.6.tar.gz
tar -zxf ds9.linux.5.6.tar.gz
sudo mv ds9 /usr/local/bin
sudo chmod +x /usr/local/bin/ds9
Start-up script
For convenience, we will make a start-up script (created by michael hutchinson http://mjhutchinson.com/) that will open an xgterm with an ecl promt and ds9. We use gedit or this, but any text editor (for example kate in kde or vim) could be used:
And next we add this to the file:
Here, the -bg and -fg options indicate respectively background and font colors for the xgterm where iraf will be run. Some of the available colors are lemon chiffon, black, darkslategrey, linen, red, green, blue, cyan, yellow, purple, magenta and slategray. I personally prefer the black on green layout...
Then, add execution permission to the script:
With this, iraf can be run just by running the command irafshell.
Running iraf
First, I clean the ~/iraf folder (THIS COMMAND WILL DELETE EVERYTHING ON THE FOLDER):
to run iraf, we create the login.cl and use irafshell command. When mkiraf asks for terminal type, select xgterm.
If you get the error "xgterm: no available ptys", Then follow this steps (if iraf started correctly, then you dont need to this):
sudo chmod +x /usr/local/bin/xgterm
-----------------------------------------------------------------------------------------------------------------------
ds9: error while loading shared libraries: libXss.so.1: cannot open shared object file: No such file or directory
To find out which package provides (or contains) a certain file in Ubuntu, you can use the "apt-file" command.
First, make sure "apt-file" is installed.
sudo apt-get install apt-fileNow, using "apt-file" is simple enough.
apt-file search filename-to-search.forThis outputs a list of packages that provide a file named "filename-to-search.for", thus allowing you to install the necessary package(s) using apt-get.
Real-life answerIn your case, you would need to run the following command:
apt-file search libXss.so.1This outputs the following:
libxss1: /usr/lib/i386-linux-gnu/libXss.so.1
libxss1: /usr/lib/i386-linux-gnu/libXss.so.1.0.0
libxss1-dbg: /usr/lib/debug/usr/lib/i386-linux-gnu/libXss.so.1.0.0
This indicates that the package you need to install in this specific case is most likely "libxss1".
So, to install it, run the following command:
sudo apt-get install libxss1Now, try running DS9 again, and you should find that the error message is now gone.
----------------------------------------------------------------------------------------------------------------------
And now you should be able to run the command irafshell with no problems.
Icon!
This is a suggestion made by Elias Pizarro. You can download the iraf icon and use it to show an iraf icon in your application list wich will execute the irafshell script. First, download the iraf icon:
Then, create the desktop entry:
And add to the file this:
install ,OK! 仅需复制窗口内的命令到终端即可完成安装!
References: www.ubuntuforums.org/showthread.php?t=912583
http://hi.baidu.com/feifei_1014/item/058cb2f13db1dd703c198b6c
承蒙协助,谨致谢忱!
2010-08-04于河北兴隆 2014-03-29修改于BNU
Archiver|手机版|科学网 ( 京ICP备07017567号-12 )
GMT+8, 2024-4-25 09:05
Powered by ScienceNet.cn
Copyright © 2007- 中国科学报社