ubuntu 安装之 apt update 报错

系统安装体验建议: 1. ubuntu server 18.04 版本安装时候,选择安装软件步骤: 安装ssh-server,便于远程登录操作,方便进一步配置;

                           2. 个人在安装live版本的18.04及20.10版本时候,在安装下载部分皆发生报错,就算由cn.archive.ubuntu(默认中国镜像源)镜像源改为mirrors.aliyun.com/ubuntu/镜像源,也同样在过程中报错(具体为安装kernel时),查看log文件。。。。。。。。

补充: 安装完之后发现采用aliyun的镜像,有问题,安装R包时,总是找不到;改成清华镜像源,不知道这里修改其他镜像源可不可以成功,对服务器网络这块,我也是一个睁眼瞎。

CutinErrors, 好吧,具体看报错,应该时network的原因, network disabled, 应该是看配置文件:/etc/cloud/cloud.cfg.d/subiquity-dissable-cloudiny-networking.cfg,live版本需要云服务在线下载安装,不知道是我网络的原因还是本身的bug,不过别人安装好像都很顺溜-。。。。。。

报错如下图:

然后根据关键词“CutinErrors /etc/cloud/cloud.cfg.d” 检索(bing 国际版本检索), 这玩意儿是啥

 https://wiki.archlinux.org/index.php/Cloud-init

Cloud-init is a package that contains utilities for early initialization of cloud instances. It is needed in Arch Linux images that are built with the intention of being launched in cloud environments like OpenStack, AWS etc. linux安装镜像云安装的支持包,那应该就是这里了。

以上都是事后回顾整理发现,我已经使用了非live18.04版本,在网上找了一下解决方案,个人服务器没有安装这个包,就不能实施操作测试了,感兴趣的可以查看一下;

另外知乎上有一篇Cloud-init中文博文介绍,https://zhuanlan.zhihu.com/p/27664869

然后根据报错查询,根据 https://support.huaweicloud.com/usermanual-ims/ims_01_0407.html 博客中的说明配置详细信息,也可以查找英文原本配置文件详细说明,根据报错修改,结果未测试

跳入help选项,进入linux进行修改,root账号,Cloud-Init接管网络允许;

vi /etc/cloud/cloud.cfg

network:

config: abled


3. ubuntu server 18.04  apt update 报错: Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?),应该还是网络的问题

不同ubuntu版本代码名:

14.04 :trusty 

16.04 :xenial 

18.04 : bionic

18.04 :focal


Get:1 http://mirrors.aliyun.com/ubuntu bionic InRelease [6,910 B]

Get:2 http://mirrors.aliyun.com/ubuntu bionic-security InRelease [6,910 B]

Get:3 http://mirrors.aliyun.com/ubuntu bionic-updates InRelease [6,910 B]

Get:4 http://mirrors.aliyun.com/ubuntu bionic-backports InRelease [6,910 B]

Get:5 http://mirrors.aliyun.com/ubuntu bionic-proposed InRelease [6,910 B]

Err:1 http://mirrors.aliyun.com/ubuntu bionic InRelease

  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)

Err:2 http://mirrors.aliyun.com/ubuntu bionic-security InRelease

  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)

Err:3 http://mirrors.aliyun.com/ubuntu bionic-updates InRelease

  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)

Err:4 http://mirrors.aliyun.com/ubuntu bionic-backports InRelease

  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)

Err:5 http://mirrors.aliyun.com/ubuntu bionic-proposed InRelease

  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)

Reading package lists... Done      

N: See apt-secure(8) manpage for repository creation and user configuration details.

N: Updating from such a repository can't be done securely, and is therefore disabled by default.

E: The repository 'http://mirrors.aliyun.com/ubuntu bionic InRelease' is not signed.

-------------------------------------------------------------------

Failed to fetch

http://mirrors.aliyun.com/ubuntu/dists/bionic-proposed/InRelease 

Clearsigned file isn't valid, got 'NOSPLIT' (does the network require

authentication?)

E: The repository 'http://mirrors.aliyun.com/ubuntu bionic-proposed InRelease' is not signed.

N: Updating from such a repository can't be done securely, and is therefore disabled by default.

N: See apt-secure(8) manpage for repository creation and user configuration details

修改了镜像源,还是报错,看到有个博文是说DNS配置错误;然后就查看了一下DNS配置文件;

/etc/resolv.conf ,目前DNS是动态的 127.0.0.53,固定一下ip及DNS;

cat /etc/resolv.conf

# This file is managed by man:systemd-resolved(8). Do not edit.

#

# This is a dynamic resolv.conf file for connecting local clients to the

# internal DNS stub resolver of systemd-resolved. This file lists all

# configured search domains.

#

# Run "systemd-resolve --status" to see details about the uplink DNS servers

# currently in use.

#

# Third party programs must not access this file directly, but only through the

# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,

# replace this symlink by a static file or a different symlink.

#

# See man:systemd-resolved.service(8) for details about the supported modes of

# operation for /etc/resolv.conf.

nameserver 127.0.0.53

options edns0

# Run "systemd-resolve --status" to see details about the uplink DNS servers currently in use.

运行 systemd-resolve --status 查看当前DNS,

~$ systemd-resolve --status

Global

          DNSSEC NTA: 10.in-addr.arpa

                      16.172.in-addr.arpa

                  --------------

                      31.172.in-addr.arpa

                      corp

                      d.f.ip6.arpa

                      home

                      internal

                      intranet

                      lan

                      local

                      private

                      test

Link 2 (eno1)

      Current Scopes: DNS

       LLMNR setting: yes

MulticastDNS setting: no

      DNSSEC setting: no

    DNSSEC supported: no

         DNS Servers: 114.114.114.114

                                8.8.8.8

ifconfig 查看当前网卡,ip及掩码信息;

route -n 查看网关信息

route -n

Kernel IP routing table

Destination    Gateway        Genmask        Flags Metric Ref    Use Iface

0.0.0.0        192.168.xx.1    0.0.0.0        UG    100    0        0 eno1

192.168.xx.x    0.0.0.0        255.255.255.0  U    0      0        0 eno1

192.168.xx.x    0.0.0.0        255.255.255.255 UH    100    0        0 eno1


然后 配置静态ip及固定DNS

sudo vi /etc/netplan/01-netcfg.yaml


gibh@ubuntu:~$ sudo vi /etc/netplan/01-netcfg.yaml

# This file describes the network interfaces available on your system

# For more information, see netplan(5).

network:

  version: 2

  renderer: networkd

  ethernets:

    eno1:

      dhcp4: no

      dhcp6: no

      adresses: [192.168.xx.xx/24] # 个人想要固定的ip,通常固定的是最后一个地址,24 代表掩码  255.255.255.0

      gateway4: 192.168.xx.1

      nameservers:

              addresses: [114.114.114.114, 8.8.8.8]

最后:~$ sudo netplan apply ,使用配置, 配置成功之后,会自动断网,然后利用新ip进行连接 

然后顺利进行sudo apt update

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 216,402评论 6 499
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 92,377评论 3 392
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 162,483评论 0 353
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 58,165评论 1 292
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 67,176评论 6 388
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 51,146评论 1 297
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 40,032评论 3 417
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 38,896评论 0 274
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 45,311评论 1 310
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,536评论 2 332
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 39,696评论 1 348
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,413评论 5 343
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 41,008评论 3 325
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,659评论 0 22
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,815评论 1 269
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 47,698评论 2 368
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 44,592评论 2 353

推荐阅读更多精彩内容