装了snap包,却装不了?到底怎么装snap包?

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
deii
帖子: 146
注册时间: 2018-04-24 20:06

Re: 装了snap包,却装不了?到底怎么装snap包?

#46

帖子 deii » 2018-05-09 21:19

poloshiao 写了:終端機指令及文字回應
請直接複製貼上來 (包含指令及回應文字)
不要摘錄 不要擷圖
方便回文直接引用你貼上來的資料
方便你閱讀
deii@deii-TVB01:~$ history 1
47 history 1
deii@deii-TVB01:~$ history 5
44 sudo snap install deepin-terminal --devmode
45 sudo snap install deepin-music
46 snap list
47 history 1
48 history 5
deii@deii-TVB01:~$ sudo snap install deepin-music
[sudo] deii 的密码:
error: cannot install "deepin-music": Post
https://api.snapcraft.io/v2/snaps/refresh: dial tcp: lookup
api.snapcraft.io on [::1]:53: read udp [::1]:46529->[::1]:53: read:
connection refused
deii@deii-TVB01:~$ snap changes
ID Status Spawn Ready Summary
4 Done 2018-05-08T12:39:23Z 2018-05-08T12:55:55Z Install "vscode" snap
5 Error 2018-05-08T14:08:42Z 2018-05-09T17:33:24Z Install "deepin-music" snap

deii@deii-TVB01:~$ sudo snap abort 5
error: cannot abort change 5 with nothing pending
deii@deii-TVB01:~$ snap changes
ID Status Spawn Ready Summary
4 Done 2018-05-08T12:39:23Z 2018-05-08T12:55:55Z Install "vscode" snap
5 Error 2018-05-08T14:08:42Z 2018-05-09T17:33:24Z Install "deepin-music" snap

deii@deii-TVB01:~$ sudo snap install deepin-music
error: cannot install "deepin-music": Post
https://api.snapcraft.io/v2/snaps/refresh: dial tcp: lookup
api.snapcraft.io on [::1]:53: read udp [::1]:40070->[::1]:53: read:
connection refused
deii@deii-TVB01:~$ snap changes
ID Status Spawn Ready Summary
4 Done 2018-05-08T12:39:23Z 2018-05-08T12:55:55Z Install "vscode" snap
5 Error 2018-05-08T14:08:42Z 2018-05-09T17:33:24Z Install "deepin-music" snap

deii@deii-TVB01:~$ snap abort 5
error: cannot abort change 5 with nothing pending
deii@deii-TVB01:~$ sudo snap abort 5
error: cannot abort change 5 with nothing pending
deii@deii-TVB01:~$ sudo snap install deepin-music
error: cannot install "deepin-music": Post
https://api.snapcraft.io/v2/snaps/refresh: dial tcp: lookup
api.snapcraft.io on [::1]:53: read udp [::1]:51958->[::1]:53: read:
connection refused
deii@deii-TVB01:~$ sudo snap install kicad
[sudo] deii 的密码:
error: cannot install "kicad": Post https://api.snapcraft.io/v2/snaps/refresh:
dial tcp: lookup api.snapcraft.io on [::1]:53: read udp
[::1]:60991->[::1]:53: read: connection refused
已经全部复制上来了!麻烦你帮忙看看哪出了问题,并请提供解决方法。
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 装了snap包,却装不了?到底怎么装snap包?

#47

帖子 poloshiao » 2018-05-10 9:00

sudo snap install deepin-music
error: cannot install "deepin-music": Post
https://api.snapcraft.io/v2/snaps/refresh: dial tcp: lookup
api.snapcraft.io on [::1]:53: read udp [::1]:46529->[::1]:53: read:
connection refused
1. 連線 被拒絕
1-2. 暫時 把 IPv6 關閉 試試
方法 參閱
viewtopic.php?f=116&t=487148&p=3203522& ... 1#p3203522
建議 把 IPv6 關閉
deii
帖子: 146
注册时间: 2018-04-24 20:06

Re: 装了snap包,却装不了?到底怎么装snap包?

#48

帖子 deii » 2018-05-10 18:11

poloshiao 写了:
sudo snap install deepin-music
error: cannot install "deepin-music": Post
https://api.snapcraft.io/v2/snaps/refresh: dial tcp: lookup
api.snapcraft.io on [::1]:53: read udp [::1]:46529->[::1]:53: read:
connection refused
1. 連線 被拒絕
1-2. 暫時 把 IPv6 關閉 試試
方法 參閱
viewtopic.php?f=116&t=487148&p=3203522& ... 1#p3203522
建議 把 IPv6 關閉
deii@deii-TVB01:~$ /etc/default/grub
bash: /etc/default/grub: 权限不够
deii@deii-TVB01:~$ GRUB_CMDLINE_LINUX_DEFAULT="quiet splash ipv6.disabl
我这个权限不够,是不是要进入root才行?!
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 装了snap包,却装不了?到底怎么装snap包?

#49

帖子 poloshiao » 2018-05-10 20:01

/etc/default/grub
bash: /etc/default/grub: 权限不够
1. 上面的 /etc/default/grub 是文字檔案 不能直接執行

2. 如果你會使用 vim 指令 試試

代码: 全选

sudo vim.tiny /etc/default/grub
2-1. vim.tiny 是預裝的文字檔編輯指令
deii
帖子: 146
注册时间: 2018-04-24 20:06

Re: 装了snap包,却装不了?到底怎么装snap包?

#50

帖子 deii » 2018-05-10 20:11

poloshiao 写了:
/etc/default/grub
bash: /etc/default/grub: 权限不够
1. 上面的 /etc/default/grub 是文字檔案 不能直接執行

2. 如果你會使用 vim 指令 試試

代码: 全选

sudo vim.tiny /etc/default/grub
2-1. vim.tiny 是預裝的文字檔編輯指令
我都没装vim啊!有什么其它的方法?
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 装了snap包,却装不了?到底怎么装snap包?

#51

帖子 poloshiao » 2018-05-10 20:59

2-1. vim.tiny 是預裝的文字檔編輯指令
你安裝 ubuntu 時 就預裝了
deii
帖子: 146
注册时间: 2018-04-24 20:06

Re: 装了snap包,却装不了?到底怎么装snap包?

#52

帖子 deii » 2018-05-10 21:14

poloshiao 写了:
2-1. vim.tiny 是預裝的文字檔編輯指令
你安裝 ubuntu 時 就預裝了
我装的是xubuntu,如何启用vim?启用vim的什么模式打这个指令?
vim.tiny
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 装了snap包,却装不了?到底怎么装snap包?

#53

帖子 poloshiao » 2018-05-10 21:31

我装的是 xubuntu
1. xubuntu 有沒有 vim.tiny 你試試 不就知道了

2. 如果沒有 vim.tiny
xubuntu 也有另外的文字編輯器
例如 leafpad

代码: 全选

gksudo leafpad /etc/default/grub
deii
帖子: 146
注册时间: 2018-04-24 20:06

Re: 装了snap包,却装不了?到底怎么装snap包?

#54

帖子 deii » 2018-05-10 21:41

poloshiao 写了:
我装的是 xubuntu
1. xubuntu 有沒有 vim.tiny 你試試 不就知道了

2. 如果沒有 xubuntu 也有另外的文字編輯器
例如 leafpad
你能不能说清楚点!还有,我虽然没用过vin,但我知道vim有指令模式、输入模式、行末模式之分,你让我在哪个模式打那行指令?用文字编辑器怎么解决这个问题?
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 装了snap包,却装不了?到底怎么装snap包?

#55

帖子 poloshiao » 2018-05-11 10:42

你让我在哪个模式打那行指令?
把下面指令 複製

代码: 全选

sudo vim.tiny /etc/default/grub

代码: 全选

gksudo leafpad /etc/default/grub
貼進 xubuntu 的 終端機 執行

如果還有問題 做一點基本功 詳細參閱
https://docs.xubuntu.org/1804/user/C/index.html
Xubuntu Documentation
(可惜 沒有中文版本)
deii
帖子: 146
注册时间: 2018-04-24 20:06

Re: 装了snap包,却装不了?到底怎么装snap包?

#56

帖子 deii » 2018-05-11 17:41

代码: 全选

sudo vim.tiny /etc/default/grub
貼進 xubuntu 的 終端機 執行
将sudo vim.tiny /etc/default/grub命令复制进终端后,终端反应如下:
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 装了snap包,却装不了?到底怎么装snap包?

#57

帖子 poloshiao » 2018-05-11 17:48

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
1. viewtopic.php?p=3203522#p3203522
把上面這一行 改為
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash ipv6.disable=1"
1-1. 儲存
1-2. 重新開機

2. 如果你對 vim 的使用方法 還不熟悉
建議你 使用 leafpad

代码: 全选

gksudo leafpad /etc/default/grub
deii
帖子: 146
注册时间: 2018-04-24 20:06

Re: 装了snap包,却装不了?到底怎么装snap包?

#58

帖子 deii » 2018-05-11 18:01

poloshiao 写了:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
1. viewtopic.php?p=3203522#p3203522
把上面這一行 改為
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash ipv6.disable=1"
1-1. 儲存
1-2. 重新開機
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash ipv6.disabie=1"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
~
~
-- INSERT --
改了,如何保存修改的配置?原贴是修改保存后更新的,而你让我修改保存后直接重新开机?!
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 装了snap包,却装不了?到底怎么装snap包?

#59

帖子 poloshiao » 2018-05-11 18:23

如何保存修改的配置
-- INSERT --
1. 表示你目前是 編輯模式
2. 按下 esc 鍵 (會變成 命令模式)
3. 然後 按下 :w (出現在最下一行)
4. 按下 Enter 鍵 (就會儲存 看看畫面 有沒有順利儲存完畢)
5. 然後 按下 :q (出現在最下一行)
6. 按下 Enter 鍵 (就會離開 vim.tiny 回到 終端機)
deii
帖子: 146
注册时间: 2018-04-24 20:06

Re: 装了snap包,却装不了?到底怎么装snap包?

#60

帖子 deii » 2018-05-11 18:33

poloshiao 写了:
如何保存修改的配置
-- INSERT --
1. 表示你目前是 編輯模式
2. 按下 esc 鍵 (會變成 命令模式)
3. 然後 按下 :w (出現在最下一行)
4. 按下 Enter 鍵 (就會儲存 看看畫面 有沒有順利儲存完畢)
5. 然後 按下 :q (出現在最下一行)
6. 按下 Enter 鍵 (就會離開 vim.tiny 回到 終端機)
回到终端后就关了终端并且重启系统!刚进入系统就出现错误,以前出现过这个错误,也在论坛上问过,无关紧要的。
回复