ubuntu 下source和NDS配置

本文介绍了如何在Ubuntu系统中配置软件源以提高下载速度,并提供了两种不同的DNS配置方案来优化网络连接。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1、在/etc/apt/sources.list文件,可以添加如下地址:

deb http://mirrors.163.com/ubuntu/ quantal main universe restricted multiverse
deb-src http://mirrors.163.com/ubuntu/ quantal main universe restricted multiverse
deb http://mirrors.163.com/ubuntu/ quantal-security universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ quantal-security universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ quantal-updates universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ quantal-proposed universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ quantal-proposed universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ quantal-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ quantal-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ quantal-updates universe main multiverse restricted
deb http://mirrors.sohu.com/ubuntu/ quantal main restricted
deb-src http://mirrors.sohu.com/ubuntu/ quantal main restricted
deb http://mirrors.sohu.com/ubuntu/ quantal-updates main restricted
deb-src http://mirrors.sohu.com/ubuntu/ quantal-updates main restricted
deb http://mirrors.sohu.com/ubuntu/ quantal universe
deb-src http://mirrors.sohu.com/ubuntu/ quantal universe
deb http://mirrors.sohu.com/ubuntu/ quantal-updates universe
deb-src http://mirrors.sohu.com/ubuntu/ quantal-updates universe
deb http://mirrors.sohu.com/ubuntu/ quantal multiverse
deb-src http://mirrors.sohu.com/ubuntu/ quantal multiverse
deb http://mirrors.sohu.com/ubuntu/ quantal-updates multiverse
deb-src http://mirrors.sohu.com/ubuntu/ quantal-updates multiverse
deb http://mirrors.sohu.com/ubuntu/ quantal-backports main restricted universe multiverse
deb-src http://mirrors.sohu.com/ubuntu/ quantal-backports main restricted universe multiverse
deb http://mirrors.sohu.com/ubuntu/ quantal-security main restricted
deb-src http://mirrors.sohu.com/ubuntu/ quantal-security main restricteddeb http://mirrors.sohu.com/ubuntu/ quantal-security multiverse
deb-src http://mirrors.sohu.com/ubuntu/ quantal-security multiverse
deb http://extras.ubuntu.com/ubuntu quantal main
deb-src http://extras.ubuntu.com/ubuntu quantal main

deb http://mirrors.aliyun.com/ubuntu/ quantal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ quantal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ quantal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ quantal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ quantal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ quantal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ quantal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ quantal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ quantal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ quantal-backports main restricted universe multiverse

deb http://tw.archive.ubuntu.com/ubuntu/ quantal main universe restricted multiverse
deb-src http://tw.archive.ubuntu.com/ubuntu/ quantal main universe restricted multiverse
deb http://tw.archive.ubuntu.com/ubuntu/ quantal-security universe main multiverse restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ quantal-security universe main multiverse restricted
deb http://tw.archive.ubuntu.com/ubuntu/ quantal-updates universe main multiverse restricted
deb-src http://tw.archive.ubuntu.com/ubuntu/ quantal-updates universe main multiverse restricted
deb http://mirrors.sohu.com/ubuntu/ quantal-security universe
deb-src http://mirrors.sohu.com/ubuntu/ quantal-security universe


2.使用sudo apt-get update 命令更新源。


DNS配置:

1、修改/etc/resolvconf/resolv.conf.d/base文件添加如果配置

电信DNS服务:

nameserver 202.96.134.133
nameserver 202.96.128.68


或者谷歌DNS服务:

nameserver 8.8.8.8
nameserver 8.8.4.4


2、使用sudo resolvconf -u更新配置,在/etc/resolvconf.conf文件中查看配置是否生效


elro -ffunction-sections -fdata-sections" /home/ubuntu/tina-v821-release/prebuilt/hostbuilt/make4.1/bin/make -C /home/ubuntu/tina-v821-release/out/v821/avaota_f1/openwrt/build_dir/target/hostapd-full-internal/hostapd-2020-06-08-5a8b3662/hostapd AR="riscv32-linux-musl-ar" AS="riscv32-linux-musl-gcc -c -Os -pipe -fno-caller-saves -fno-plt -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wformat -Werror=format-security -DPIC -fpic -D_FORTIFY_SOURCE=2 -Wl,-z,now -Wl,-z,relro -ffunction-sections -fdata-sections" LD=riscv32-linux-musl-ld NM="riscv32-linux-musl-nm" CC="riscv32-linux-musl-gcc" GCC="riscv32-linux-musl-gcc" CXX="riscv32-linux-musl-g++" RANLIB="riscv32-linux-musl-ranlib" STRIP=riscv32-linux-musl-strip OBJCOPY=riscv32-linux-musl-objcopy OBJDUMP=riscv32-linux-musl-objdump SIZE=riscv32-linux-musl-size CONFIG_ACS=y CONFIG_DRIVER_NL80211=y CONFIG_IEEE80211N= CONFIG_IEEE80211AC= CONFIG_IEEE80211AX= CONFIG_DRIVER_WEXT= CONFIG_WEP=y LIBS="-L/home/ubuntu/tina-v821-release/prebuilt/rootfsbuilt/riscv/nds32le-linux-musl-v5d//sysroot/usr/lib -DPIC -fpic -specs=/home/ubuntu/tina-v821-release/openwrt/openwrt/include/hardened-ld-pie.specs -znow -zrelro -Wl,--gc-sections -fuse-linker-plugin -lubox -lubus -lm -lnl-tiny" LIBS_c="" AR="riscv32-linux-musl-ar" BCHECK= hostapd hostapd_cli make[4]: Entering directory '/home/ubuntu/tina-v821-release/out/v821/avaota_f1/openwrt/build_dir/target/hostapd-full-internal/hostapd-2020-06-08-5a8b3662/hostapd' In file included from main.c:26: /home/ubuntu/tina-v821-release/out/v821/avaota_f1/openwrt/build_dir/target/hostapd-full-internal/hostapd-2020-06-08-5a8b3662/src/ap/hostapd.h:84:21: error: field 'ubus' has incomplete type 84 | struct ubus_object ubus; | ^~~~ Makefile:1302: recipe for target 'main.o' failed make[4]: *** [main.o] Error 1 make[4]: Leaving directory '/home/ubuntu/tina-v821-release/out/v821/avaota_f1/openwrt/build_dir/target/hostapd-full-internal/hostapd-2020-06-08-5a8b3662/hostapd' Makefile:708: recipe for target '/home/ubuntu/tina-v821-release/out/v821/avaota_f1/openwrt/build_dir/target/hostapd-full-internal/hostapd-2020-06-08-5a8b3662/.built' failed make[3]: *** [/home/ubuntu/tina-v821-release/out/v821/avaota_f1/openwrt/build_dir/target/hostapd-full-internal/hostapd-2020-06-08-5a8b3662/.built] Error 2 make[3]: Leaving directory '/home/ubuntu/tina-v821-release/openwrt/openwrt/package/network/services/hostapd' time: package/network/services/hostapd/full-internal/compile#0.71#0.22#0.79#1751822626.32#1751822627.10 ERROR: package/network/services/hostapd failed to build (build variant: full-internal). More error defails please refer to: /home/ubuntu/tina-v821-release/openwrt/openwrt/build_log/package/network/services/hostapd/full-internal/compile.txt package/Makefile:114: recipe for target 'package/network/services/hostapd/compile' failed make[2]: *** [package/network/services/hostapd/compile] Error 1 make[2]: Leaving directory '/home/ubuntu/tina-v821-release/openwrt/openwrt' package/Makefile:110: recipe for target '/home/ubuntu/tina-v821-release/openwrt/openwrt/staging_dir/target/stamp/.package_compile' failed make[1]: *** [/home/ubuntu/tina-v821-release/openwrt/openwrt/staging_dir/target/stamp/.package_compile] Error 2 make[1]: Leaving directory '/home/ubuntu/tina-v821-release/openwrt/openwrt' /home/ubuntu/tina-v821-release/openwrt/openwrt/include/toplevel.mk:238: recipe for target 'world' failed make: *** [world] Error 2 make: Leaving directory '/home/ubuntu/tina-v821-release/openwrt/openwrt' INFO: build_openwrt_rootfs failed 编译tianlinux的时候报错如上,帮我看看怎么办?
最新发布
07-08
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值