手頭有塊板子沒有squid,需要安裝,剛好環境中有編譯好的squid_3.5.27-1_ramips_24kec.ipk。
root@DrogooBox:/mnt/mmcblk0p1/opkgbin# ./opkg-cl install /mnt/mmcblk0p1/squid_3.
5.27-1_ramips_24kec.ipk
Installing squid (3.5.27-1) to root...
Collected errors:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for squid:
* libltdl * libstdcpp *
* opkg_install_cmd: Cannot install package squid.
缺少另外兩個依賴libltdl_2.4-1_ramips_24kec.ipk和libstdcp
p_4.8-linaro-1_ramips_24kec.ipk 。沒關係,繼續安裝就可以了,這兩個ipk在編譯環境中的路徑
bin/ramips/packages/base/
下可以找到。
但是,安裝libltdl_2.4-1_ramips_24kec.ipk的時候可能會報錯:
root@DrogooBox:/mnt/mmcblk0p1/opkgbin# ./opkg-cl install /mnt/mmcblk0p1/libltdl_
2.4-1_ramips_24kec.ipk
Installing libltdl (2.4-1) to root...
Configuring libltdl.
//usr/lib/opkg/info/libltdl.postinst: line 4: default_postinst: not found
Collected errors:
* pkg_run_script: package "libltdl" postinst script returned status 127.
* opkg_configure: libltdl.postinst returned 127.
default_postinst找不到,直接去看/usr/lib/opkg/info/libltdl.postinst
#!/bin/sh
[ "${IPKG_NO_SCRIPT}" = "1" ] && exit 0
. ${IPKG_INSTROOT}/lib/functions.sh
default_postinst $0 $@
從腳本看應該是在/lib/functions.sh中有定義,找了一圈沒有,問了度娘和谷歌,有人直接暴力添加,那就這樣吧,直接在/lib/functions.sh中添加兩個函數:
default_postinst(){
return 0
}
default_prerm(){
return 0
}
繼續安裝
root@DrogooBox:/mnt/mmcblk0p1/opkgbin# ./opkg-cl install /mnt/mmcblk0p1/libltdl_
2.4-1_ramips_24kec.ipk
Installing libltdl (2.4-1) to root...
Configuring libltdl.
root@DrogooBox:/mnt/mmcblk0p1/opkgbin# ./opkg-cl install /mnt/mmcblk0p1/libstdcp
p_4.8-linaro-1_ramips_24kec.ipk
Installing libstdcpp (4.8-linaro-1) to root...
Configuring libstdcpp.
root@DrogooBox:/mnt/mmcblk0p1/opkgbin# ./opkg-cl install /mnt/mmcblk0p1/squid_3.
5.27-1_ramips_24kec.ipk
Installing squid (3.5.27-1) to root...
Configuring squid.
root@DrogooBox:/mnt/mmcblk0p1/opkgbin# squid -h
Usage: squid [-cdhvzCFNRVYX] [-n name] [-s | -l facility] [-f config-file] [-[au] port] [-k signal]
-a port Specify HTTP port number (default: 3128).
-d level Write debugging to stderr also.
-f file Use given config-file instead of
/etc/squid/squid.conf
-h Print help message.
-k reconfigure|rotate|shutdown|restart|interrupt|kill|debug|check|parse
Parse configuration file, then send signal to
running copy (except -k parse) and exit.
-n name Specify service name to use for service operations
default is: squid.
-s | -l facility
Enable logging to syslog.
-u port Specify ICP port number (default: 3130), disable with 0.
-v Print version.
-z Create missing swap directories and then exit.
-C Do not catch fatal signals.
-D OBSOLETE. Scheduled for removal.
-F Don't serve any requests until store is rebuilt.
-N No daemon mode.
-R Do not set REUSEADDR on port.
-S Double-check swap during rebuild.
-X Force full debugging.
-Y Only return UDP_HIT or UDP_MISS_NOFETCH during fast reload.
最後安裝squid的時間可能會長一點,因爲squid還挺大的,squid_3.5.27-1_ramips_24kec.ipk大概1.5MB。