2015年12月8日 星期二

[RaspberryPi] apt-get update fail issue.

最近著手玩起 Raspberry Pi 的板子,
但是當執行 sudo apt-get update 時, 總是會遇到錯誤,
錯誤如下,
========================================================================
pi@raspberrypi:/etc/network$ sudo apt-get update
Err http://mirrordirector.raspbian.org jessie InRelease

Err http://archive.raspberrypi.org jessie InRelease

Err http://mirrordirector.raspbian.org jessie Release.gpg
  Cannot initiate the connection to mirrordirector.raspbian.org:80 (2001:41c9:1:3ce::11). - connect (101: Network is unreachable) [IP: 2001:41c9:1:3ce::11 80]
Err http://archive.raspberrypi.org jessie Release.gpg
  Cannot initiate the connection to archive.raspberrypi.org:80 (2a00:1098:0:82:1000:13:0:5). - connect (101: Network is unreachable) [IP: 2a00:1098:0:82:1000:13:0:5 80]
Reading package lists... Done
W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/jessie/InRelease

W: Failed to fetch http://archive.raspberrypi.org/debian/dists/jessie/InRelease 

W: Failed to fetch http://mirrordirector.raspbian.org/raspbian/dists/jessie/Release.gpg  Cannot initiate the connection to mirrordirector.raspbian.org:80 (2001:41c9:1:3ce::11). - connect (101: Network is unreachable) [IP: 2001:41c9:1:3ce::11 80]

W: Failed to fetch http://archive.raspberrypi.org/debian/dists/jessie/Release.gpg  Cannot initiate the connection to archive.raspberrypi.org:80 (2a00:1098:0:82:1000:13:0:5). - connect (101: Network is unreachable) [IP: 2a00:1098:0:82:1000:13:0:5 80]

W: Some index files failed to download. They have been ignored, or old ones used instead.
========================================================================

因為公司的網路連外都需要設定 proxy, 所以還是設定一下吧.

設定 Proxy:
在 /etc/apt/apt.conf.d 下建立 "10proxy" 這個檔案, 然後修改他的內容如下,

Acquire::http::Proxy "http://id:password@yourproxyaddress:proxyport";

存檔.

有必要的話, 再設定 DNS:
打開 /etc/resolv.conf

sudo vi /etc/resolv.conf

加上
nameserver 8.8.8.8
或是貴公司的 DNS address
存檔.

reboot..........即可!!!

2015年5月17日 星期日

在 ASUS A8M(A84PMM36DD) 安裝 Ubuntu 12.04.1 所遭遇上的問題

這兩天要在老舊電腦 ASUS A8M 安裝 Ubuntu 12.04.1 來做一些實驗,
結果上網 download Ubuntu 12.04.1 的 iso, 並且做成 LiveCD 後,
安裝老半天 都安裝不進去.
Google 了一下, 原來網上都已經有類似的問題了,

ASUS A8M(A84PMM36DD) 規格:
CPU: AMD Turion(tm) 64 Mobile Technology MK-36
CPU Speed: 2.00GHz
Memory: 1GHz
Display: nVidia GeForce Go 6100

按照 LiveCD 的一般開機流程安裝, 總共會遭遇到 2 個問題,
  1. 在安裝過程中, 當進行輸入 區域, 鍵盤設定, 帳號設定 之後, 畫面就會跳離, 接著會彈出一個 error message 的視窗,
    Error message:
    The installer encountered an unrecoverable error. A desktop session will now be run so that you may investigate the problem or try installing again.

    依據 Google 之後的結果, 看起來是因為 nVidia 顯示卡驅動程式所造成的問題, 導致安裝流程沒有辦法繼續, 詳細原因請再自行尋找.

    Solution:
    選擇使用 LiveCD 開機後, 當出現如下畫面時, 馬上按下 Space key,
  2. 會打開進階選單, 選擇好語言後, 如下圖,
    選擇 Try Ubuntu without installing,
    按下 F6 鍵, 打開 Other Options, 如下圖,

    使用上下鍵, 移至 nomodeset, 按下 Enter,
    nomodeset 字串必須出現一個 X , 再按下 Esc,
    再 選擇 Try Ubuntu without installing 開機,
    進入桌面後, 再點選桌面上的 Installation Icon 進行安裝,
    應該就不會再出現 Error Message.


  3. 當 item-1 解決後, 依著安裝流程, 當安裝到輸入 "帳號密碼" 且按 "下一步" 後,
    會遇到另一個問題, 也就是出現選擇 "大頭貼" 的畫面, 然後畫面會馬上跳掉, 離開安裝程序.

    Solution:
    因為選擇大頭貼時, 會啟用 webcam 裝置, 但是 webcam 所顯示的影像是破碎的且不正常的,
    於是懷疑問題應該是出現在 webcam device.
    請輸入以下 command 去 移掉 webcam device.
    $ lsmod | grep gspca
    gspca_vc032x                    31999    0  
    gspca_main                        27654    1  gspca_vc032x
    videodev                            86588    1  gspca_main

    $ sudo rmmod gspca_vc032x
    $ sudo rmmod gspca_main
    $ sudo rmmod videodev


    移掉之後, 再點選桌面上的 installation Icon 進行安裝, 當進行完輸入 "帳號密碼" 且按 "下一步", 會自行跳過選擇大頭貼的程序, 即可以完成安裝.

參考資料:
http://www.ubuntu-tw.org/modules/newbb/viewtopic.php?viewmode=compact&topic_id=51294&forum=1
https://help.ubuntu.com/community/BootOptions#Common_Kernel_Options
http://shengpo.logdown.com/posts/32586-asus-zenbook-ux32vd-ubuntu

http://www.hecticgeek.com/2012/10/how-to-disable-your-webcam-in-ubuntu/
http://askubuntu.com/questions/166809/how-can-i-disable-my-webcam