在CentOS7 64位下安装shc-3.8.6

来源:互联网 发布:淘宝收藏动态图片 编辑:程序博客网 时间:2024/06/06 16:32

shc是一个专业的加密shell脚本的工具.它的作用是把shell脚本转换为一个可执行的二进制文件,这个办法很好的解决了脚本中含有IP、密码等不希望公开的问题.

百度百科

http://baike.baidu.com/link?url=HeZKRXWFMH1Tln_fVfbseDobF10R9W8SAIbqTECijH2sfO908JSx11EXjoHBFc_5l1K5QLkveQeK0zbtaxzq0_

安装shc-3.8.6
1、
#make test


***     Compiling script "match"
CFLAGS="-Wall -O6 -pedantic" ./shc -v -f match
/bin/sh: ./shc: /lib/ld-linux.so.2: bad ELF interpreter: No such file or directory
make: *** [match.x] Error 126


2、
修复/lib/ld-linux.so.2: bad ELF interpreter: No such file or directory问题
 
在64系统里执行32位程序如果出现/lib/ld-linux.so.2: 
bad ELF interpreter: No such file or directory,安装下glibc.i686 即可
执行 
$sudo yum install glibc.i686
 
如果报错
error while loading shared libraries: libz.so.1: 
cannot open shared object file: No such file or directory
执行
$sudo yum install zlib.i686


3、执行 make install 时,报错
***     Installing shc and shc.1 on /usr/local
***     緿o you want to continue? y
install -c -s shc /usr/local/bin/
install -c -m 644 shc.1 /usr/local/man/man1/
install: target 鈥usr/local/man/man1/鈥is not a directory: No such file or directory
make: *** [install] Error 1 


4、# mkdir /usr/local/man/man1/ (install时会把man文件放入该目录,如果该目录不存在需提前建好)


mkdir /usr/local/man
mkdir /usr/local/man/man1


5、
make strings

make isntall
make: *** No rule to make target `isntall'.  Stop.
[root@clusternode0x31 shc-3.8.6]# make install
***     Installing shc and shc.1 on /usr/local
***     緿o you want to continue? y
install -c -s shc /usr/local/bin/
install -c -m 644 shc.1 /usr/local/man/man1/
6、
# shc -C
shc Version 3.8.6, Generic Script Compiler
shc Copyright (c) 1994-2006 Francisco Rosales <frosal@fi.upm.es>
shc Copying:


    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.


    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.


    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.


    Report problems and questions to:


    Francisco Rosales <frosal@fi.upm.es>

0 0
原创粉丝点击