LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1052|回复: 11

我安装了perl 5.8,怎么显示的是低版本的perl?

[复制链接]
发表于 2003-10-2 10:34:39 | 显示全部楼层 |阅读模式
# perl --version

This is perl, version 5.005_03 built for i386-freebsd

Copyright 1987-1999, Larry Wall

Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5.0 source kit.

Complete documentation for Perl, including FAQ lists, should be found on
this system using `man perl' or `perldoc perl'.  If you have access to the
Internet, point your browser at http://www.perl.com/, the Perl Home Page.

# pkg_info|grep perl
perl-5.8.0_7        Practical Extraction and Report Language
#

why? help me ! thanks~~
发表于 2003-10-2 11:16:37 | 显示全部楼层
cd /usr/bin
ls perl*

因为你的perl链接到了低版本的perl中,
 楼主| 发表于 2003-10-2 12:43:59 | 显示全部楼层
# cd /usr/bin
# ls perl*
perl*           perl5*          perl5.00503*    perlbug*        perlcc*         perldoc*
#

没有,只有perl5.00503
发表于 2003-10-2 12:50:20 | 显示全部楼层
当然会没有呢,
你看不是有perl嘛,而且这个还是个链接文件呢,链接到老版本的perl上了,



你安装的新版本的在/usr/local/bin下,

其实/usr/bin/下的perl也是链接的/usr/loca/bin下的,你看看就明白了的,
ls -l就一目了然了,
 楼主| 发表于 2003-10-2 13:39:16 | 显示全部楼层
# file perl*
perl:      ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), for FreeBSD 4.8, dynamically linked (uses shared libs), stripped
perl5:     symbolic link to /usr/local/bin/perl
perl5.8.0: symbolic link to /usr/local/bin/perl
perlbug:   a /usr/local/bin/perl script text executable
perlcc:    a /usr/local/bin/perl script text executable
perldoc:   a /usr/local/bin/perl script text executable
perlivp:   a /usr/local/bin/perl script text executable
# rm -fr /perl5
# rm -fr /root/bin/perl5
# whereis perl5.8.0
perl5.8.0: /usr/local/bin/perl5.8.0
# file /usr/local/bin/perl5.8.0
/usr/local/bin/perl5.8.0: symbolic link to /usr/local/bin/perl
# pwd
/usr/local/bin
#
我都搞糊涂了。
发表于 2003-10-2 13:45:07 | 显示全部楼层
/usr/bin/下的perl都是在/usr/local/bin/下有关perl的链接,

ls -l /usr/bin/perl*
ls -l /usr/local/bin/perl*
如果要使用新版本的perl,删除原来的链接,重新做一个就行了,
发表于 2003-10-3 19:09:08 | 显示全部楼层

可以切换的。

输入:

# /usr/local/bin/use.perl port

切换到port中的perl.
发表于 2003-10-3 19:37:37 | 显示全部楼层
谢谢。行拉~~
发表于 2003-10-3 20:45:19 | 显示全部楼层

回复: 可以切换的。

最初由 subltam 发表
输入:

# /usr/local/bin/use.perl port

切换到port中的perl.



请问usr.perl port有什么用,还有恢复原来的port的命令是什么,兄弟能不能给个链接看看,
 楼主| 发表于 2003-10-3 22:15:28 | 显示全部楼层
bash-2.05b# us
usbd       usbdevs    usbhidctl  use.perl   users
bash-2.05b# usr

(小声的说)是use.perl 不是 usr.perl

我也不懂。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表