chromium 安装flash-plugins 解决方案

来源:互联网 发布:mysql scope identity 编辑:程序博客网 时间:2024/06/10 14:18

不记得从今年什么时候起,Chromium 不再支持 Netscape plugin API (NPAPI),官方软件仓库中的 flashplugin 已经无法工作。


浏览器不支持flash怎么能用?必须解决之。


1.网上搜索了半天,大多是按照浏览器提示下载Adobe Flash Player 插件,然后解压出libflashplayer.so,把libflashplayer.so复制到/usr/lib/chromium-browser/plugins/,最后重启chromium,地址栏中输入:chrome://plugins ,将Adobe Flash Player 插件启用即可。————这就是官方软件仓库中的 flashplugin的手工安装法嘛!显然是行不通的。


2.好吧,参看Chromium (简体中文) - ArchWiki:

可以使用 Google Chrome (新Pepper API)提供的 Flash.

可以通过AUR中提供的软件包进行安装:

  • chromium-pepper-flash - 稳定版本

  • chromium-pepper-flash-dev - 开发版本

请在chrome://plugins中启用 /usr/lib/PepperFlash/libpepflashplayer.so.

好吧,yaourt -S chromium-pepper-flash各种版本,结果都是下不下来资源:

错误: 无法下载 google-chrome-stable-37.0.2062.94-1.i386.rpm

错误: 无法下载 google-chrome-unstable_current_i386.deb

等等


3.看来只能另想办法,既然chrome里面有这个pepper-flash,那我就直接去拿。

下载chrome安装包,或者干脆安装一个chrome,然后在/opt/google/chrome/PepperFlash里,我得到了 libpepflashplayer.so,

马上复制到/usr/lib/chromium-browser/plugins/,没有这个目录只有/usr/lib/chromium,看到几个其他的插件so就在/usr/lib/chromium,好那就把 libpepflashplayer.so也复制到这里。

重启chromium,转到chrome://plugins,没有libpepflashplayer.so啊!怎么回事?


4.这里还差点什么,chromium没有搜索到libpepflashplayer.so的存在,怎么办?

漫长的网上寻找,我找到了http://askubuntu.com/questions/158388/how-do-i-make-chromium-use-flash-from-google-chrome,里面有一个回复,还需要修改/etc/chromium-browser/default

Download Google Chrome and extract libpepflashplayer.so from /opt/google/chrome/PepperFlash in the Chrome deb file Copy libpepflashplayer.so to /usr/lib/chromium-browser/plugins Make the necessary changes to the Chromium startup

sudo gedit /etc/chromium-browser/default

Add this to the CHROMIUM_FLAGS

CHROMIUM_FLAGS="--ppapi-flash-path=/usr/lib/chromium-browser/plugins/libpepflashplayer.so --ppapi-flash-version=11.5.31.2"

You can get the correct version of the flash plugin from the "version": json tag in the mainfest.json from /opt/google/chrome/PepperFlash in the Chrome deb file

于是我对应修改了/etc/chromium/default为:

1
2
3
4
5
# Default settings for chromium. This file is sourced by /usr/bin/chromium
 
# Options to pass to chromium
#CHROMIUM_FLAGS=""
CHROMIUM_FLAGS="--ppapi-flash-path=/usr/lib/chromium/libpepflashplayer.so --ppapi-flash-version=14.0.0.177"

其中的flash-version可在/opt/google/chrome/PepperFlash/manifest.json里面查到。


最后,再次重启chromium,flash插件已正常工作。

0 0