最近使用安裝了ubuntu和linux mint,都發現firefox的flash雖然能用,但還是覺得有點小問題,想使用google chrome,但無奈,一安裝使用后就發現flash不能用,顯示adobe flash is out of date。
經過在網上大量查找資料,終於搞好了,下面分享我的方法:
首先,安裝chrome:
64 位
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo gdebi google-chrome-stable_current_amd64.deb
32 位
wget https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb
sudo gdebi google-chrome-stable_current_i386.deb
然后到/home/你的計算機用戶名/.config/google-chrome/ (注意,如果不是用命令行查看,而是使用GUI的話,home/cong/下是要按ctrl+H才顯示系統文件)
看看有沒有PepperFlash這個目錄,
網上有些網友說,是在/opt/google/chrome/,我沒有發現
然后,如果里面是空的話就代表chrome並沒有flash插件了。
我們需要到官網下載flash player,網址:https://get.adobe.com/flashplayer/
不過這里要說明一下:
一般的瀏覽器使用的是npapi,即adobe flash player,但chrome則改為使用ppapi,即pepperflash
我們這次是要下載pepper,所以必須使用chrome訪問adobe的官網,因為adobe的官網下載flash是會自動檢測瀏覽器的,如果使用firefox,會自動下載npapi,這就不適合chrome了。
下載后,壓縮包里有個libpepflashplayer.so的文件,這就是pepperflash把這個.so文件拷貝到/home/你的計算機用戶名/.config/google-chrome/PepperFlash這個目錄下。
然后,需要讓chrome啟動時,自動關聯這個.so文件,打開終端:
sudo vim /usr/share/applications/google-chrome.desktop
在這個配置文件的108行,“Exec=/usr/bin/google-chrome-stable %U”后加入“ --ppapi-flash-path=/home/你的計算機用戶名/.config/google-chrome/PepperFlash/libpepflashplayer.so”
即變為Exec=/usr/bin/google-chrome-stable %U --ppapi-flash-path=/home/你的計算機用戶名/.config/google-chrome/PepperFlash/libpepflashplayer.so
中間有個空格,保存文件。
這是重新打開chrome,在地址欄輸入chrome://plugins/
確保打開了flash組件,
到這里,就ok了。