小米路由器3 opkg安装

小米路由器3 opkg安装

1、复制opkg到小米路由的/data路径下。

下载地址:http://sangbo.pub/soft/opkg/opkg

2、修改/etc/opkg.conf文件,替换为以下内容:

src/gz attitude_adjustment_base http://openwrt.sangbo.pub/barrier_breaker/14.07/ramips/mt7620a/packages/base
src/gz attitude_adjustment_packages http://openwrt.sangbo.pub/barrier_breaker/14.07/ramips/mt7620a/packages/packages/
src/gz attitude_adjustment_luci http://openwrt.sangbo.pub/barrier_breaker/14.07/ramips/mt7620a/packages/luci/
src/gz attitude_adjustment_management http://openwrt.sangbo.pub/barrier_breaker/14.07/ramips/mt7620a/packages/management/
src/gz attitude_adjustment_oldpackages http://openwrt.sangbo.pub/barrier_breaker/14.07/ramips/mt7620a/packages/oldpackages/
src/gz attitude_adjustment_routing http://openwrt.sangbo.pub/barrier_breaker/14.07/ramips/mt7620a/packages/routing/
src/gz openwrt_dist http://openwrt-dist.sourceforge.net/releases/ramips/packages
src/gz openwrt_dist_luci http://openwrt-dist.sourceforge.net/releases/luci/packages
dest root /data
dest ram /tmp
lists_dir ext /data/var/opkg-lists
option overlay_root /data
arch all 100
arch ramips 200
arch ramips_24kec 300

原地址可能是被河蟹了,自己代理了一下进行访问,源地址:https://downloads.openwrt.org/

下载地址:http://sangbo.pub/soft/opkg/opkg.conf

3、添加环境变量。修改/etc/profile文件,修改export PATH为:

export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/data:/data/usr/sbin:/data/usr/bin

再这一行下面新添加一行:

export LD_LIBRARY_PATH=/data/usr/lib

4、-1重启(reboot)生效
或者
4、-2设置临时变量

# export PATH=$PATH:/data:/data/usr/bin:/data/usr/sbin  
# export LD_LIBRARY_PATH=LD_LIBRARY_PATH:/data/usr/lib

5、更新opkg

# opkg update

ps:如果提示错误,缺少libc*。这里需进行安装,注意保持libc为最新版本。

# cd /data
# wget http://openwrt.sangbo.pub/barrier_breaker/14.07/ramips/mt7620a/packages/base/libc_0.9.33.2-1_ramips_24kec.ipk 
# opkg install libc_*.ipk
# rm -rf libc_0.9.33.2-1_ramips_24kec.ipk

你可能感兴趣的:(路由器)