安装 pepperflash 报错

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

安装 pepperflash 报错

#1

帖子 NetDreamer » 2016-03-26 14:30

执行

代码: 全选

sudo apt-get install pepperflashplugin-nonfree
然后执行

代码: 全选

sudo update-pepperflashplugin-nonfree --install
返回的信息:
ERROR: failed to retrieve status information from google : W: Can't drop privileges for downloading as file './var/lib/apt/lists/partial/dl.google.com_linux_chrome_deb_dists_stable_InRelease' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: 权限不够)
W: gpgv:./var/lib/apt/lists/partial/dl.google.com_linux_chrome_deb_dists_stable_Release.gpg: The repository is insufficiently signed by key 4CCA1EAF950CEE4AB83976DCA040830F7FAC5991 (weak digest)
More information might be available at:
http://wiki.debian.org/PepperFlashPlayer
到底是签名的问题,还是 google 不能访问的问题?
Live and let live.
头像
九天星
帖子: 1441
注册时间: 2007-07-14 20:45

Re: 安装 pepperflash 报错

#2

帖子 九天星 » 2016-03-26 14:42

用排除法,

你可以到
http://laod.cn/hosts/2016-google-hosts.html
下载hosts文件,然后更改/etc/hosts,就可以使用google了。

然后再进行安装,再不行就是签名问题了呗! :Haha
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 安装 pepperflash 报错

#3

帖子 vickycq » 2016-03-26 18:53

同样的问题:
https://bugs.launchpad.net/ubuntu/+sour ... ug/1527426
https://bugs.launchpad.net/ubuntu/+sour ... ug/1556230

看 #1527426 的 9 楼
复制过来:
Kamal Mostafa (kamalmostafa) 在 2016-03-07 写了:Workaround for pepperflashplugin-nonfree install fails "Can't drop privileges"
-----------------------------------------------------------------------------

On install, this error message occurs...

ERROR: failed to retrieve status information from google : W: Can't drop privileges for downloading as file './var/lib/apt/lists/partial/dl.google.com_linux_chrome_deb_dists_stable_InRelease' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)

Note that the package *does* actually get installed, but its installer script fails to run properly. Lets help it run properly... Run these commands in a terminal window:

#
# Part 1: Copy, edit, then run a modified copy of the script (as user _apt),
# to download the plugin
#

cp /usr/sbin/update-pepperflashplugin-nonfree /tmp

sudo chown _apt /var/cache/pepperflashplugin-nonfree/ /usr/lib/pepperflashplugin-nonfree/

editor /tmp/update-pepperflashplugin-nonfree

{ Find this line, and insert a '#' to comment it out }:

[ `id -u` = "0" ] || die_hard "must be root"

... becomes ...
#[ `id -u` = "0" ] || die_hard "must be root"

sudo -u _apt /tmp/update-pepperflashplugin-nonfree --install --verbose

It will download the latest plugin, but then fail with this error:

chown: changing ownership of '/usr/lib/pepperflashplugin-nonfree/libpepflashplayer.so': Operation not permitted

Good. Proceed...

#
# Part 2: Edit and run the script a second time (as user root)
# to install the plugin
#

editor /tmp/update-pepperflashplugin-nonfree

{ Find this line, and insert a '#' to comment it out }:

stdouterr=`APT_CONFIG=apt.conf apt-get --quiet --quiet update 2>&1`

... becomes ...
#stdouterr=`APT_CONFIG=apt.conf apt-get --quiet --quiet update 2>&1`

sudo /tmp/update-pepperflashplugin-nonfree --install --verbose

Ignore the "E: No packages found" and "ls: cannot access" errors.
It should run successfully to completion anyway, ending with:

end of update-pepperflashplugin-nonfree

sudo chown root /var/cache/pepperflashplugin-nonfree/ /usr/lib/pepperflashplugin-nonfree/

... After the above procedure, pepperflashplugin will be installed and configured. Restart your browser, and enjoy.
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
头像
NetDreamer
帖子: 858
注册时间: 2007-10-19 20:40
联系:

Re: 安装 pepperflash 报错

#4

帖子 NetDreamer » 2016-03-28 17:05

代码: 全选

cp /usr/sbin/update-pepperflashplugin-nonfree /tmp

代码: 全选

sudo chown _apt /var/cache/pepperflashplugin-nonfree/ /usr/lib/pepperflashplugin-nonfree/

代码: 全选

editor /tmp/update-pepperflashplugin-nonfree

代码: 全选

sudo -u _apt /tmp/update-pepperflashplugin-nonfree --install --verbose
options : --install --verbose --
temporary directory: /tmp/pepperflashplugin-nonfree.Q0gJS1AWtj
doing apt-get update on google repository
cleaning up temporary directory /tmp/pepperflashplugin-nonfree.Q0gJS1AWtj ...
ERROR: failed to retrieve status information from google : W: http://dl.google.com/linux/chrome/deb/d ... elease.gpg: Signature by key 4CCA1EAF950CEE4AB83976DCA040830F7FAC5991 uses weak digest algorithm (SHA1)
More information might be available at:
http://wiki.debian.org/PepperFlashPlayer

代码: 全选

editor /tmp/update-pepperflashplugin-nonfree

代码: 全选

sudo /tmp/update-pepperflashplugin-nonfree --install --verbose
options : --install --verbose --
temporary directory: /tmp/pepperflashplugin-nonfree.ZFUTpu1OPK
doing apt-get update on google repository
E: 没有发现匹配的软件包
E: 没有发现匹配的软件包
E: 没有发现匹配的软件包
E: 没有发现匹配的软件包
E: 没有发现匹配的软件包
downloading http://people.debian.org/~bartm/pepperf ... rified.txt
selected action = --install
dpkg-deb:错误:--extract 需要一个目录作为目标目录。
或许您应该使用 dpkg --install?

输入 dpkg-deb --help 可获得有关操作 *.deb 文件的帮助;
输入 dpkg --help 可获得有关安装和卸载软件包的帮助。

代码: 全选

sudo chown root /var/cache/pepperflashplugin-nonfree/ /usr/lib/pepperflashplugin-nonfree/
Live and let live.
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 安装 pepperflash 报错

#5

帖子 vickycq » 2016-03-28 17:43

NetDreamer 写了:代码:
请确保严格按照楼上的步骤进行
看上去从这里开始就对应不上了:
It will download the latest plugin, but then fail with this error:
chown: changing ownership of '/usr/lib/pepperflashplugin-nonfree/libpepflashplayer.so': Operation not permitted
Good. Proceed...
猜测 是众所周知的原因

想用 flash 直接安装 google-chrome 就好
从这里下载安装:
http://mirror.pcbeta.com/google/chrome/ ... me-stable/
http://www.ubuntuupdates.org/pm/google-chrome-stable
http://mirror.ufs.ac.za/google-chrome/d ... me-stable/
http://google-chrome.en.uptodown.com/ubuntu/old
https://repo.fdzh.org/chrome/deb/pool/m ... me-stable/
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
头像
NetDreamer
帖子: 858
注册时间: 2007-10-19 20:40
联系:

Re: 安装 pepperflash 报错

#6

帖子 NetDreamer » 2016-03-28 20:43

想问一下,这些都是可信的源吗,不会是经过修改的之类吧。
Live and let live.
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 安装 pepperflash 报错

#7

帖子 vickycq » 2016-03-28 20:49

NetDreamer 写了: 想问一下,这些都是可信的源吗,不会是经过修改的之类吧。
理论上都是和谷歌官方源同步的。
例如 https://repo.fdzh.org/chrome/deb/pool/m ... me-stable/
如果不放心,可以参考 https://www.google.com/linuxrepositories/ 利用公钥检验
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
头像
NetDreamer
帖子: 858
注册时间: 2007-10-19 20:40
联系:

Re: 安装 pepperflash 报错

#8

帖子 NetDreamer » 2016-03-28 20:55

vickycq 写了: 理论上都是和谷歌官方源同步的。
例如 https://repo.fdzh.org/chrome/deb/pool/m ... me-stable/
如果不放心,可以参考 https://www.google.com/linuxrepositories/ 利用公钥检验
也谈不上不放心,只是稍微有点洁癖 :Haha
Live and let live.
头像
NetDreamer
帖子: 858
注册时间: 2007-10-19 20:40
联系:

Re: 安装 pepperflash 报错

#9

帖子 NetDreamer » 2016-03-28 20:59

@vickycq
你说的公钥是啥啊,是不是md5 或 sha1 值之类?如果是的话,能否贴个这些值的图?
Live and let live.
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 安装 pepperflash 报错

#10

帖子 vickycq » 2016-03-28 22:13

NetDreamer 写了:@vickycq
你说的公钥是啥啊,是不是md5 或 sha1 值之类?如果是的话,能否贴个这些值的图?
公钥加密机制基于成对的密钥:公钥和私钥。公钥公开给他人,私钥自己留存。可以用私钥给一个文件签名。如果一个私钥用于签署一个文件,那么任何人只要拥有对应的公钥就可以检查该文件是否由该私钥签名。没有私钥的人不能伪造这样一个签名。

https://www.google.com/linuxrepositories/ 的内容复制过来:
The Linux Package Signing Key
Google’s Linux packages are signed with a GNU Privacy Guard (GPG) key. Google’s packages will automatically configure your package manager to verify product updates with the public signing key, but you may also install it separately if, for instance, you want to verify the integrity of an initial package download. Follow the instructions below to manually configure your package manager to use the key.

Key Details

Download: https://dl.google.com/linux/linux_signing_key.pub
Key ID: Google, Inc. Linux Package Signing Key <linux-packages-keymaster@google.com>
Fingerprint: 4CCA 1EAF 950C EE4A B839 76DC A040 830F 7FAC 5991
综上所述:
1. 从 https://repo.fdzh.org/chrome/deb/pool/m ... me-stable/ 下载 deb
2. 从 https://dl.google.com/linux/linux_signing_key.pub 下载谷歌的公钥
3. 参考 http://blog.packagecloud.io/eng/2014/10 ... ositories/ 利用公钥验证 deb 包的签名,过程比较复杂。


其实正确的用法是利用 apt-key 导入谷歌公钥,添加 https://repo.fdzh.org/chrome/deb/pool/m ... me-stable/ 到软件源,再用 apt-get 安装 google-chrome-stable。这个过程中会自动校验软件包。如果软件包被做过手脚,会提示:WARNING: The following packages cannot be authenticated!
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
头像
NetDreamer
帖子: 858
注册时间: 2007-10-19 20:40
联系:

Re: 安装 pepperflash 报错

#11

帖子 NetDreamer » 2016-03-29 8:53

继续向 vickycq 请教:
vickycq 写了:2. 从 https://dl.google.com/linux/linux_signing_key.pub 下载谷歌的公钥
其实正确的用法是利用 apt-key 导入谷歌公钥,
这两条,在无法访问 Google 的情况下,能否做到?我想先确认下,再尝试。
Live and let live.
头像
NetDreamer
帖子: 858
注册时间: 2007-10-19 20:40
联系:

Re: 安装 pepperflash 报错

#12

帖子 NetDreamer » 2016-03-29 8:56

嗨我都没试。我回贴后试了下https://dl.google.com/linux/linux_signing_key.pub,能打开
我这就尝试下 @vickycq 说的。
Live and let live.
头像
NetDreamer
帖子: 858
注册时间: 2007-10-19 20:40
联系:

Re: 安装 pepperflash 报错

#13

帖子 NetDreamer » 2016-03-29 9:16

@vickycq :
为了减少麻烦你,我自己搜索了一下,想尝试以下步骤:

代码: 全选

wget -q -O - https://dl.google.com/linux/linux_signing_key.pub  | sudo apt-key add -
然后添加源:

代码: 全选

deb  https://repo.fdzh.org/chrome/deb/pool/main/g/google-chrome-stable/ xenial main
最后:

代码: 全选

apt-get update
apt-get install google-chrome-stable
这样可否,希望尽快得到您的指导!
Live and let live.
头像
vickycq
帖子: 4507
注册时间: 2011-03-20 13:12
系统: Debian
来自: 山东省寿光县
联系:

Re: 安装 pepperflash 报错

#14

帖子 vickycq » 2016-03-29 9:28

NetDreamer 写了: 然后添加源:

代码: 全选

deb  https://repo.fdzh.org/chrome/deb/pool/main/g/google-chrome-stable/ xenial main
这一处有问题
官方源的格式为:deb http://dl.google.com/linux/chrome/deb/ stable main
因此我们设置为:deb http://repo.fdzh.org/chrome/deb/ stable main

如果要用 https,必须先安装 apt-transport-https 使 apt-get 支持 https 协议

或者直接

代码: 全选

sudo wget https://repo.fdzh.org/chrome/google-chrome.list -P /etc/apt/sources.list.d/
Debian 中文论坛 - forums.debiancn.org
欢迎所有 Debian GNU/Linux 用户
头像
NetDreamer
帖子: 858
注册时间: 2007-10-19 20:40
联系:

Re: 安装 pepperflash 报错

#15

帖子 NetDreamer » 2016-03-29 9:58

@vickycq :
OK!

代码: 全选

sudo wget https://repo.fdzh.org/chrome/google-chrome.list -P /etc/apt/sources.list.d/
--2016-03-29 09:51:55-- https://repo.fdzh.org/chrome/google-chrome.list
正在解析主机 repo.fdzh.org (repo.fdzh.org)... 110.79.20.49
正在连接 repo.fdzh.org (repo.fdzh.org)|110.79.20.49|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度: 105 [application/octet-stream]
正在保存至: “/etc/apt/sources.list.d/google-chrome.list”

google-chrome.list 100%[===================>] 105 --.-KB/s in 0s

2016-03-29 09:51:55 (29.8 MB/s) - 已保存 “/etc/apt/sources.list.d/google-chrome.list” [105/105])

代码: 全选

 wget -q -O - https://dl.google.com/linux/linux_signing_key.pub  | sudo apt-key add -
OK

代码: 全选

sudo apt-get update
命中:1 http://cn.archive.ubuntu.com/ubuntu xenial InRelease
命中:2 http://cn.archive.ubuntu.com/ubuntu xenial-updates InRelease
命中:3 http://cn.archive.ubuntu.com/ubuntu xenial-backports InRelease
忽略:4 https://repo.fdzh.org/chrome/deb stable InRelease
命中:5 http://security.ubuntu.com/ubuntu xenial-security InRelease
获取:6 https://repo.fdzh.org/chrome/deb stable Release [1,189 B]
获取:7 https://repo.fdzh.org/chrome/deb stable Release.gpg [181 B]
忽略:8 https://dl.google.com/linux/chrome/deb stable InRelease
获取:9 https://repo.fdzh.org/chrome/deb stable/main amd64 Packages [1,356 B]
获取:10 https://dl.google.com/linux/chrome/deb stable Release [1,189 B]
获取:11 https://dl.google.com/linux/chrome/deb stable Release.gpg [181 B]
获取:12 https://dl.google.com/linux/chrome/deb stable/main amd64 Packages [1,356 B]
已下载 5,452 B,耗时 1秒 (4,045 B/s)
正在读取软件包列表... 完成
W: https://repo.fdzh.org/chrome/deb/dists/ ... elease.gpg: Signature by key 4CCA1EAF950CEE4AB83976DCA040830F7FAC5991 uses weak digest algorithm (SHA1)
N: 鉴于仓库 'https://repo.fdzh.org/chrome/deb stable InRelease' 不支持 'i386' 体系结构,跳过配置文件 'main/binary-i386/Packages' 的捕获。
W: https://dl.google.com/linux/chrome/deb/ ... elease.gpg: Signature by key 4CCA1EAF950CEE4AB83976DCA040830F7FAC5991 uses weak digest algorithm (SHA1)
N: 鉴于仓库 'https://dl.google.com/linux/chrome/deb stable InRelease' 不支持 'i386' 体系结构,跳过配置文件 'main/binary-i386/Packages' 的捕获。

代码: 全选

sudo apt-get install google-chrome-stable
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
将会同时安装下列软件:
libappindicator1 libindicator7
下列【新】软件包将被安装:
google-chrome-stable libappindicator1 libindicator7
升级了 0 个软件包,新安装了 3 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 48.7 MB 的归档。
解压缩后会消耗 186 MB 的额外空间。
您希望继续执行吗? [Y/n] Y
错误:1 http://cn.archive.ubuntu.com/ubuntu xenial/main amd64 libindicator7 amd64 12.10.2+16.04.20151208-0ubuntu1
无法连接上 cn.archive.ubuntu.com:80 (115.28.122.210)。 - connect (111: 拒绝连接) [IP: 115.28.122.210 80]
错误:2 http://cn.archive.ubuntu.com/ubuntu xenial/main amd64 libappindicator1 amd64 12.10.1+15.04.20141110-0ubuntu1
不能连接到 cn.archive.ubuntu.com:http: [IP: 115.28.122.210 80]
获取:3 https://dl.google.com/linux/chrome/deb stable/main amd64 google-chrome-stable amd64 49.0.2623.110-1 [48.7 MB]
已下载 48.7 MB,耗时 41秒 (1,164 kB/s)
E: 下载 http://cn.archive.ubuntu.com/ubuntu/poo ... _amd64.deb 无法连接上 cn.archive.ubuntu.com:80 (115.28.122.210)。 - connect (111: 拒绝连接) [IP: 115.28.122.210 80] 失败

E: 下载 http://cn.archive.ubuntu.com/ubuntu/poo ... _amd64.deb 不能连接到 cn.archive.ubuntu.com:http: [IP: 115.28.122.210 80] 失败

E: 有几个软件包无法下载,要不运行 apt-get update 或者加上 --fix-missing 的选项再试试?
再次执行 UPDATE 和 INSTALL 命令,
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
将会同时安装下列软件:
libappindicator1 libindicator7
下列【新】软件包将被安装:
google-chrome-stable libappindicator1 libindicator7
升级了 0 个软件包,新安装了 3 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 40.7 kB/48.7 MB 的归档。
解压缩后会消耗 186 MB 的额外空间。
您希望继续执行吗? [Y/n] Y
获取:1 http://cn.archive.ubuntu.com/ubuntu xenial/main amd64 libindicator7 amd64 12.10.2+16.04.20151208-0ubuntu1 [21.9 kB]
获取:2 http://cn.archive.ubuntu.com/ubuntu xenial/main amd64 libappindicator1 amd64 12.10.1+15.04.20141110-0ubuntu1 [18.8 kB]
已下载 40.7 kB,耗时 0秒 (179 kB/s)
正在选中未选择的软件包 libindicator7。
(正在读取数据库 ... 系统当前共安装有 178335 个文件和目录。)
正准备解包 .../libindicator7_12.10.2+16.04.20151208-0ubuntu1_amd64.deb ...
正在解包 libindicator7 (12.10.2+16.04.20151208-0ubuntu1) ...
正在选中未选择的软件包 libappindicator1。
正准备解包 .../libappindicator1_12.10.1+15.04.20141110-0ubuntu1_amd64.deb ...
正在解包 libappindicator1 (12.10.1+15.04.20141110-0ubuntu1) ...
正在选中未选择的软件包 google-chrome-stable。
正准备解包 .../google-chrome-stable_49.0.2623.110-1_amd64.deb ...
正在解包 google-chrome-stable (49.0.2623.110-1) ...
正在处理用于 libc-bin (2.23-0ubuntu2) 的触发器 ...
正在处理用于 bamfdaemon (0.5.3~bzr0+16.04.20160322.1-0ubuntu1) 的触发器 ...
Rebuilding /usr/share/applications/bamf-2.index...
正在处理用于 gnome-menus (3.13.3-6ubuntu3) 的触发器 ...
正在处理用于 desktop-file-utils (0.22-1ubuntu4) 的触发器 ...
正在处理用于 mime-support (3.59ubuntu1) 的触发器 ...
正在处理用于 man-db (2.7.5-1) 的触发器 ...
正在设置 libindicator7 (12.10.2+16.04.20151208-0ubuntu1) ...
正在设置 libappindicator1 (12.10.1+15.04.20141110-0ubuntu1) ...
正在设置 google-chrome-stable (49.0.2623.110-1) ...
update-alternatives: 使用 /usr/bin/google-chrome-stable 来在自动模式中提供 /usr/bin/x-www-browser (x-www-browser)
update-alternatives: 使用 /usr/bin/google-chrome-stable 来在自动模式中提供 /usr/bin/gnome-www-browser (gnome-www-browser)
update-alternatives: 使用 /usr/bin/google-chrome-stable 来在自动模式中提供 /usr/bin/google-chrome (google-chrome)
正在处理用于 libc-bin (2.23-0ubuntu2) 的触发器 ...

代码: 全选

/usr/bin/google-chrome-stable 
Live and let live.
回复