首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > UNIXLINUX >

vsftp make失败解决方法

2012-03-09 
vsftpmake失败C/C++ codegcc -c main.c -O2 -Wall -W -Wshadow-idirafter dummyincgcc -c utility.c -O2 -

vsftp make失败

C/C++ code
gcc -c main.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c utility.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c prelogin.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c ftpcmdio.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c postlogin.c -O2 -Wall -W -Wshadow  -idirafter dummyincpostlogin.c: In function ‘process_post_login’:postlogin.c:459: warning: passing argument 3 of ‘vsf_cmdio_write’ from incompatible pointer typepostlogin.c: In function ‘load_forward_info’:postlogin.c:1036: warning: comparison between signed and unsignedpostlogin.c:1049: warning: declaration of ‘index’ shadows a global declaration/usr/include/string.h:304: warning: shadowed declaration is herepostlogin.c:1055: warning: comparison between signed and unsignedpostlogin.c: In function ‘ftp’:postlogin.c:1177: warning: comparison between signed and unsignedpostlogin.c:1243: warning: pointer targets in passing argument 3 of ‘getsockname’ differ in signednesspostlogin.c:1250: warning: pointer targets in passing argument 3 of ‘getsockname’ differ in signednesspostlogin.c:1260: warning: pointer targets in passing argument 3 of ‘accept’ differ in signednessgcc -c privsock.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c tunables.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c ftpdataio.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c secbuf.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c ls.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c postprivparent.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c logging.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c str.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c netstr.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c sysstr.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c strlist.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c banner.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c filestr.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c parseconf.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c secutil.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c ascii.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c oneprocess.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c twoprocess.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c privops.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c standalone.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c hash.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c tcpwrap.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c ipaddrparse.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c access.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c features.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c readwrite.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c opts.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c ssl.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c sslslave.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c ptracesandbox.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c ftppolicy.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c sysutil.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -c sysdeputil.c -O2 -Wall -W -Wshadow  -idirafter dummyincgcc -o cwftpd main.o utility.o prelogin.o ftpcmdio.o postlogin.o privsock.o tunables.o ftpdataio.o secbuf.o ls.o postprivparent.o logging.o str.o netstr.o sysstr.o strlist.o banner.o filestr.o parseconf.o secutil.o ascii.o oneprocess.o twoprocess.o privops.o standalone.o hash.o tcpwrap.o ipaddrparse.o access.o features.o readwrite.o opts.o ssl.o sslslave.o ptracesandbox.o ftppolicy.o sysutil.o sysdeputil.o -Wl,-s `./cwf_findlibs.sh` /bin/sh: ./cwf_findlibs.sh: Permission deniedsysdeputil.o: In function `vsf_sysdep_adopt_capabilities':sysdeputil.c:(.text+0xa83): undefined reference to `cap_init'sysdeputil.c:(.text+0xa9e): undefined reference to `cap_set_proc'sysdeputil.c:(.text+0xab6): undefined reference to `cap_free'sysdeputil.c:(.text+0xaf1): undefined reference to `cap_set_flag'sysdeputil.c:(.text+0xb15): undefined reference to `cap_set_flag'sysdeputil.c:(.text+0xb4a): undefined reference to `cap_set_flag'sysdeputil.c:(.text+0xb6e): undefined reference to `cap_set_flag'sysdeputil.o: In function `vsf_sysdep_has_capabilities':sysdeputil.c:(.text+0xb91): undefined reference to `cap_get_proc'sysdeputil.c:(.text+0xb9b): undefined reference to `cap_free'sysdeputil.o: In function `vsf_sysdep_check_auth':sysdeputil.c:(.text+0xc28): undefined reference to `pam_start'sysdeputil.c:(.text+0xc60): undefined reference to `pam_set_item'sysdeputil.c:(.text+0xc81): undefined reference to `pam_set_item'sysdeputil.c:(.text+0xc96): undefined reference to `pam_end'sysdeputil.c:(.text+0xcad): undefined reference to `pam_end'sysdeputil.c:(.text+0xcd3): undefined reference to `pam_set_item'sysdeputil.c:(.text+0xcec): undefined reference to `pam_authenticate'sysdeputil.c:(.text+0xd05): undefined reference to `pam_acct_mgmt'sysdeputil.c:(.text+0xd1e): undefined reference to `pam_setcred'sysdeputil.c:(.text+0xd40): undefined reference to `pam_end'sysdeputil.c:(.text+0xd65): undefined reference to `pam_end'sysdeputil.c:(.text+0xd97): undefined reference to `pam_open_session'sysdeputil.c:(.text+0xdb7): undefined reference to `pam_setcred'sysdeputil.o: In function `vsf_auth_shutdown':sysdeputil.c:(.text+0xe00): undefined reference to `pam_close_session'sysdeputil.c:(.text+0xe15): undefined reference to `pam_setcred'sysdeputil.c:(.text+0xe2a): undefined reference to `pam_end'collect2: ld returned 1 exit statusmake: *** [cwftpd] Error 1 



vsf_findlib.sh 是这样的:
C/C++ code
#!/bin/sh# Cheesy hacky location of additional link libraries.locate_library() { [ ! "$1*" = "`echo $1*`" ]; }find_func() { egrep $1 $2 >/dev/null; }if find_func hosts_access tcpwrap.o; then  echo "-lwrap";  locate_library /lib/libnsl.so && echo "-lnsl";fi# Look for PAM (done weirdly due to distribution bugs (e.g. Debian) or the# crypt library.if find_func pam_start sysdeputil.o; then  locate_library /lib/libpam.so.0 && echo "/lib/libpam.so.0";  locate_library /usr/lib/libpam.so && echo "-lpam";  # HP-UX ends shared libraries with .sl  locate_library /usr/lib/libpam.sl && echo "-lpam";  # AIX ends shared libraries with .a  locate_library /usr/lib/libpam.a && echo "-lpam";else  locate_library /lib/libcrypt.so && echo "-lcrypt";  locate_library /usr/lib/libcrypt.so && echo "-lcrypt";fi# Look for the dynamic linker library. Needed by older RedHat when# you link in PAMlocate_library /lib/libdl.so && echo "-ldl";# Look for libsocket. Solaris needs this.locate_library /lib/libsocket.so && echo "-lsocket";# Look for libnsl. Solaris needs this.locate_library /lib/libnsl.so && echo "-lnsl";# Look for libresolv. Solaris needs this.locate_library /lib/libresolv.so && echo "-lresolv";# Look for libutil. Older FreeBSD need this for setproctitle().locate_library /usr/lib/libutil.so && echo "-lutil";# For older HP-UX...locate_library /usr/lib/libsec.sl && echo "-lsec";# Look for libcap (capabilities)if locate_library /lib/libcap.so.1; then  echo "/lib/libcap.so.1";else  locate_library /usr/lib/libcap.so && echo "-lcap";  locate_library /lib/libcap.so && echo "-lcap";fi# Solaris needs this for nanosleep()..locate_library /lib/libposix4.so && echo "-lposix4";locate_library /usr/lib/libposix4.so && echo "-lposix4";# Tru64 (nanosleep)locate_library /usr/shlib/librt.so && echo "-lrt";# Solaris sendfilelocate_library /usr/lib/libsendfile.so && echo "-lsendfile";# OpenSSLif find_func SSL_library_init ssl.o; then  echo "-lssl -lcrypto";fiexit 0;

请问大家是怎么回事?

[解决办法]
错误明显:/bin/sh: ./cwf_findlibs.sh: Permission denied

1 是否 sh文件无可执行权限,这类错误占绝大多数
2 干嘛这样写?
3 直接执行这个脚本看输出有没有问题,初步看没有问题的话复制到你的gcc连接命令行上执行!
4 有进一步error贴出来

热点排行