目录
2、./scripts/feeds update -a失败了提示error: RPC failed
3、./scripts/feeds update -a失败了:
4、./scripts/feeds update -a失败了提示'https://git.openwrt.org/feed/packages.git/“:服务器证书验证失败
8、make v=99最后一步编译固件出错(以下修改注意路径)
9、编译完成没有openwrt-ath79-tiny-tplink_tl-wr841-v9-squashfs-factory.bin的固件
1、官方下载源码
官网下载源码
https://openwrt.org/下面是当前稳定版本
或者用官网命令下载
第一个我下载不了https://git.openwrt.org/openwrt/openwrt.git
解决
用的是第二个git clone https://github.com/openwrt/openwrt.git
2、./scripts/feeds update -a失败了提示error: RPC failed
解决
vi feeds.conf.default
将https修改成git,如图
3、./scripts/feeds update -a失败了:
解决
git config --global url."https://github.com".insteadOf git://github.com
4、./scripts/feeds update -a失败了提示'https://git.openwrt.org/feed/packages.git/“:服务器证书验证失败
解决
export GIT_SSL_NO_VERIFY=1
或,(可能上面的没那么好,建议用下面的)
git config --global http.sslverify false
5、make menuconfig时提示“Error opening terminal: linux.
Makefile:115: recipe for target 'menuconfig' failed”的解决方法
#一般都是TERM TERMINFO这两个环境变量错误引起的
#可以用echo $TERM 和echo $TERMINFO 查看是否正确
$ export TERM=vt100
$ export TERMINFO=/usr/share/terminfo
#再执行make menuconfig 基本即可正常
#如果还有问题,查看下ncurses库是否安装
$dpkg -l | grep ncurses
ii lib32ncurses5 5.9-4 shared libraries for terminal handling (32-bit)
ii libncurses5 5.9-4 shared libraries for terminal handling
ii libncurses5:i386 5.9-4 shared libraries for terminal handling
ii libncurses5-dev 5.9-4 developer's libraries for ncurses
ii libncursesw5 5.9-4 shared libraries for terminal handling (wide character support)
ii libncursesw5:i386 5.9-4 shared libraries for terminal handling (wide character support)
ii mtr-tiny 0.80-1ubuntu1 Full screen ncurses traceroute tool
ii ncurses-base 5.9-4 basic terminal type definitions
ii ncurses-bin 5.9-4 terminal-related programs and man pages
ii ncurses-term 5.9-4 additional terminal type definitions
#如果未安装使用apt-get install 命令安装此库
原文:make menuconfig时提示“error opening terminal”的解决方法_a193314的专栏-CSDN博客
6、提示gcc要安装6版本以上。
解决
跟着网站安装,第一个是我参考第二个网站安装的过程的文章
Ubuntu16.04下安装编译gcc10.1.0_m0_60027682的博客-CSDN博客
如果已经安装了几个版本,只是需要换版本
7、提示python要安装3.6版本以上。
网上找教程安装把
8、make v=99最后一步编译固件出错(以下修改注意路径)
/home/eruikeict/WORKDIR/openwrt/build_dir/host/cmake-3.21.3/Bootstrap.cmk/cmake: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/eruikeict/WORKDIR/openwrt/build_dir/host/cmake-3.21.3/Bootstrap.cmk/cmake)
解决:
1)strings /usr/lib64/libstdc++.so.6 |grep GLIBCXX 得到结果:
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_DEBUG_MESSAGE_LENGTH
2)sudo find / -name libstdc++.so.6* 得到结果:
/usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.13-gdb.pyc
/usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.13-gdb.pyo
/usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.13-gdb.py
/usr/share/gdb/auto-load/usr/lib/libstdc++.so.6.0.13-gdb.pyc
/usr/share/gdb/auto-load/usr/lib/libstdc++.so.6.0.13-gdb.pyo
/usr/share/gdb/auto-load/usr/lib/libstdc++.so.6.0.13-gdb.py
/usr/lib64/libstdc++.so.6.bak
/usr/lib64/libstdc++.so.6.0.17
/usr/lib64/libstdc++.so.6.0.13
/usr/lib64/libstdc++.so.6
/usr/local/lib64/libstdc++.so.6.0.18
/usr/local/lib64/libstdc++.so.6.0.18-gdb.py
/usr/local/lib64/libstdc++.so.6.0.20
/usr/local/lib64/libstdc++.so.6.0.20-gdb.py
/usr/local/lib64/libstdc++.so.6
可以看到,已经有libstdc++.so.6.0.20(选较高版本)
3)ls -al /usr/lib64/libstdc++.so.6 得到结果:
lrwxrwxrwx. 1 root root 30 11月 16 11:31 /usr/lib64/libstdc++.so.6 -> /usr/lib64/libstdc++.so.6.0.17
说明虽然gcc已经更新到最新版,但是连接还是旧版本,所以只需要修改连接就可以了。
解决方案步骤(注意路径):
1)sudo cp /usr/local/lib64/libstdc++.so.6.0.20 /usr/lib64 //复制文件
2)sudo rm -rf /usr/lib64/libstdc++.so.6 //删除旧文件
3)sudo ln -s /usr/lib64/libstdc++.so.6.0.20 /usr/lib64/libstdc++.so.6 //链接到新版本
原文:
Linux-GLIBCXX版本过低导致编译错误--version `GLIBCXX_3.4.20' not found - Twinhead - 博客园
9、编译完成没有openwrt-ath79-tiny-tplink_tl-wr841-v9-squashfs-factory.bin的固件
最后看到编译成功了,进目录ls -l bin/targets/ath79/tiny/发现openwrt-ath79-tiny-tplink_tl-wr841-v9-squashfs-factory.bin的固件没有,往上面找一下,可以看到在编译中有错误[mktplinkfw] *** error: images are too big by 758862 bytes,原因是生成的固件大于flash的容量,所以要修改flash的大小。
解决
vi target/linux/ath79/image/tiny-tp-link.mk
找到对应的型号,把4改成16,就可以继续编译了
当编译成功后,将固件烧录进板子,如果出现文件格式错误