SecureCRT rz , sz 安裝問題 - make: *** [posix] Error 127

tolywang發表於2011-11-07

[root@localhost packages]# rz
-bash: rz: command not found
[root@localhost packages]# ls
rzsz-3.48.tar.gz
[root@localhost packages]# tar -zxvf rzsz-3.48.tar.gz
src/
src/COPYING
src/Makefile
src/README
src/crc.c
src/crc.doc
src/crctab.c
src/gz
src/mailer.rz
src/minirb.c
src/minirb.doc
src/rbsb.c
src/rz.c
src/rz.doc
src/sz.c
src/sz.doc
src/undos.c
src/undos.doc
src/zm.c
src/zmodem.h
src/zmr.c
src/zupl.t
[root@localhost packages]#

 

[root@localhost packages]# ls    
rzsz-3.48.tar.gz  src
[root@localhost packages]# cd src/
[root@localhost src]# ls
COPYING   crc.c     gz         minirb.doc  rz.doc  undos.c    zmodem.h
Makefile  crc.doc   mailer.rz  rbsb.c      sz.c    undos.doc  zmr.c
README    crctab.c  minirb.c   rz.c        sz.doc  zm.c       zupl.t
[root@localhost src]# make

Please study the #ifdef's in crctab.c, rbsb.c, rz.c and sz.c,
make any necessary hacks for oddball or merged SYSV/BSD systems,
then type 'make SYSTEM' where SYSTEM is one of:

        posix   POSIX compliant systems
        aix     AIX systems
        next    NeXtstep v3.x (POSIX)
        odt     SCO Open Desktop
        everest SCO Open Desktop (elf, strict)
        sysvr4  SYSTEM 5.4 Unix
        sysvr3  SYSTEM 5.3 Unix with mkdir(2), COHERENT 4.2
        sysv    SYSTEM 3/5 Unix
        sysiii  SYS III/V  Older Unix or Xenix compilers
        xenix   Xenix
        x386    386 Xenix
        bsd     Berkeley 4.x BSD, Ultrix, V7
        tandy   Tandy 6000 Xenix
        dnix    DIAB Dnix 5.2
        dnix5r3 DIAB Dnix 5.3
        amiga   3000UX running SVR4
        POSIX   POSIX compliant systems (SCO Open Desktop, strict)

        undos   Make the undos, todos, etc. program.
        doc     Format the man pages with nroff

[root@localhost src]#

 

[root@localhost src]# make posix
cc   -O -DPOSIX -DMD=2 rz.c -o rz
make: cc: Command not found
make: *** [posix] Error 127
[root@localhost src]#

 

以上錯誤說明需要安裝GCC編譯環境 。  這裡是 LINUX 5.4 ,  需要到iso或光碟去找相關的rpm .   按順序安裝如下packages 。  

 

[root@localhost packages]# rpm -ivh kernel-headers-2.6.18-164.el5.i386.rpm
warning: kernel-headers-2.6.18-164.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:kernel-headers         ########################################### [100%]
[root@localhost packages]# rpm -ivh glibc-headers-2.5-42.i386.rpm
warning: glibc-headers-2.5-42.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:glibc-headers          ########################################### [100%]
[root@localhost packages]# rpm -ivh glibc-devel-2.5-42.i386.rpm
warning: glibc-devel-2.5-42.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:glibc-devel            ########################################### [100%]
[root@localhost packages]# rpm -ivh libgomp-4.4.0-6.el5.i386.rpm
warning: libgomp-4.4.0-6.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:libgomp                ########################################### [100%]
[root@localhost packages]# rpm -ivh gcc-4.1.2-46.el5.i386.rpm
warning: gcc-4.1.2-46.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:gcc                    ########################################### [100%]
[root@localhost packages]# rpm -ivh libstdc++-devel-4.1.2-46.el5.i386.rpm
warning: libstdc++-devel-4.1.2-46.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:libstdc++-devel        ########################################### [100%]
[root@localhost packages]# rpm -ivh gcc-c++-4.1.2-46.el5.i386.rpm
warning: gcc-c++-4.1.2-46.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing...                ########################################### [100%]
   1:gcc-c++                ########################################### [100%]
[root@localhost packages]#

 

[root@localhost src]# make posix
cc   -O -DPOSIX -DMD=2 rz.c -o rz
size rz
   text    data     bss     dec     hex filename
  25444     648   10464   36556    8ecc rz
rm -f rb rx rc
ln rz rb
ln rz rx
ln rz rc
cc   -O -DPOSIX sz.c -o sz
size sz
   text    data     bss     dec     hex filename
  30565     708   43072   74345   12269 sz
rm -f sb sx zcommand zcommandi
ln sz sb
ln sz sx
ln sz zcommand
ln sz zcommandi
[root@localhost src]#

 

表示安裝成功 ,   如果沒有設定到 /usr/bin 下面,   那麼可以在解壓的 src 目錄下執行 

[root@localhost src]# ./rz
rz ready. Type "sz file ..." to your modem program

Starting zmodem transfer.  Press Ctrl+C to cancel.

 

如果需要隨時隨地執行 rz,  sz,  那麼可以將這兩個命令複製到 /usr/bin 下 。

 

[root@localhost src]# cp  rz  sz   /usr/bin/
[root@localhost src]# rz 
rz ready. Type "sz file ..." to your modem program

......

 

 

 

 

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/35489/viewspace-710374/,如需轉載,請註明出處,否則將追究法律責任。

相關文章