Apr 18

出错提示为:


/opt/brcm-arm/bin/../libexec/gcc/arm-brcm-linux-uclibcgnueabi/4.5.3/cc1: error while loading shared libraries: libmpc.so.2: cannot open shared object file: No such file or directory

或者:


configure: error: C compiler cannot create executables

执行:


ldd /opt/brcm-arm/libexec/gcc/arm-brcm-linux-uclibcgnueabi/4.5.3/cc1

发现有库未找到:


   linux-gate.so.1 =>  (0xf77bf000)
   libmpc.so.2 => not found
   libmpfr.so.4 => not found
   libgmp.so.10 => not found
   libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf77aa000)
   libelf.so.1 => /usr/lib/i386-linux-gnu/libelf.so.1 (0xf7792000)
   libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf75e3000)
   /lib/ld-linux.so.2 (0xf77c0000)

解决方法,编译前执行:


export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/brcm-arm/lib:/usr/local/lib:/usr/lib

再用上面的命令检查依赖库,结果没有依赖库未找到了:


   linux-gate.so.1 =>  (0xf76f4000)
   libmpc.so.2 => /opt/brcm-arm/lib/libmpc.so.2 (0xf76de000)
   libmpfr.so.4 => /opt/brcm-arm/lib/libmpfr.so.4 (0xf768e000)
   libgmp.so.10 => /opt/brcm-arm/lib/libgmp.so.10 (0xf7631000)
   libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xf7620000)
   libelf.so.1 => /usr/lib/i386-linux-gnu/libelf.so.1 (0xf7608000)
   libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7459000)
   libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf7412000)
   /lib/ld-linux.so.2 (0xf76f5000)

编译也没问题了 :mrgreen:


Apr 17

直接编译会出错:


/opt/lib//libcrypto.a(c_zlib.o): In function zlib_stateful_expand_block': c_zlib.c:(.text+0x54): undefined reference toinflate'
/opt/lib//libcrypto.a(c_zlib.o): In function zlib_stateful_compress_block': c_zlib.c:(.text+0xd8): undefined reference todeflate'
/opt/lib//libcrypto.a(c_zlib.o): In function bio_zlib_free': c_zlib.c:(.text+0x128): undefined reference toinflateEnd'
c_zlib.c:(.text+0x144): undefined reference to deflateEnd' /opt/lib//libcrypto.a(c_zlib.o): In functionzlib_stateful_finish':
c_zlib.c:(.text+0x194): undefined reference to inflateEnd' c_zlib.c:(.text+0x19c): undefined reference todeflateEnd'
/opt/lib//libcrypto.a(c_zlib.o): In function zlib_stateful_init': c_zlib.c:(.text+0x224): undefined reference toinflateInit_'
c_zlib.c:(.text+0x26c): undefined reference to deflateInit_' /opt/lib//libcrypto.a(c_zlib.o): In functionbio_zlib_ctrl':
c_zlib.c:(.text+0x4a0): undefined reference to deflate' c_zlib.c:(.text+0x56c): undefined reference tozError'
/opt/lib//libcrypto.a(c_zlib.o): In function bio_zlib_write': c_zlib.c:(.text+0x708): undefined reference todeflate'
c_zlib.c:(.text+0x794): undefined reference to zError' c_zlib.c:(.text+0x824): undefined reference todeflateInit_'
/opt/lib//libcrypto.a(c_zlib.o): In function bio_zlib_read': c_zlib.c:(.text+0x900): undefined reference toinflate'
c_zlib.c:(.text+0x954): undefined reference to zError' c_zlib.c:(.text+0x9e0): undefined reference toinflateInit_'
collect2: error: ld returned 1 exit status
Makefile:94: recipe for target 'redsocks2' failed
make: *** [redsocks2] Error 1

解决方法,修改 Makefile:


override LIBS += -lssl -lcrypto -ldl

改成:


override LIBS += -lssl -lcrypto -ldl -lz

然后:


CCFLAGS=-static make

编译成功。


Jul 30

支持 SOCKS5 代理的:DNS2SOCKS

http://sourceforge.net/projects/dns2socks/

dns2socks.jpg

支持 HTTPS (HTTP CONNECT)代理的: DESPROXY-DNS

http://desproxy.sourceforge.net/

dns2https.jpg

能用在什么场合,想用的人自然知道,不多说了。 :evil:


Jun 21

这个脚本可以批量删除 NVRAM 中以某些字符串开头的内容:


#/bin/sh
#scriptname: nvram_unset_pro
for _TEMPVAR in `nvram show 2>/dev/null|grep "^$1"|cut -d'=' -f1`;
	do nvram unset $_TEMPVAR;
done

用法:


nvram_unset_pro bt_

这样就删除了所有 bt_ 开头的设置项。

记得删除完成后用


nvram commit

提交,否则路由器重启后又会生成。

Tags:

Nov 07

一、下载源程序


git clone https://github.com/semigodking/redsocks.git

二、编译


cd redsocks-master
make

会出错:


parser.c: In function 'vp_in_addr':
parser.c:306: error: 'AI_ADDRCONFIG' undeclared (first use in this function)
parser.c:306: error: (Each undeclared identifier is reported only once
parser.c:306: error: for each function it appears in.)
make: *** [parser.o] Error 1

三、解决,在parser.c文件的第32行插入如下代码:


#ifndef AI_ADDRCONFIG
#define AI_ADDRCONFIG 0x0020
#endif


[1/44]  1 2 3 4 5 6 7 8 9 10 > ... Last »