Debian Stable(squeeze6.0.7)升級到最新的stable(Wheezy7.0),tzdata broken,重新安裝N顯卡驅動 2013年May.5th debian 官方宣布wheezy正式發布,成為新的stable發行版 更新了很多軟體,修複了一些bug [php] Apache 2.2.22 Asterisk 1.8.13.1 GIMP 2.8.2 an updated version of the GNOME desktop environment 3.4 GNU Compiler Collection 4.7.2 Icedove 10 (an unbranded version of Mozilla Thunderbird) Iceweasel 10 (an unbranded version of Mozilla Firefox) KDE Plasma Workspaces and KDE Applications 4.8.4 kFreeBSD kernel 8.3 and 9.0 LibreOffice 3.5.4 Linux 3.2 MySQL 5.5.30 Nagios 3.4.1 OpenJDK 6b27 and 7u3 Perl 5.14.2 PHP 5.4.4 PostgreSQL 9.1 Python 2.7.3 and 3.2.3 Samba 3.6.6 Tomcat 6.0.35 and 7.0.28 Xen Hypervisor 4.1.4 the Xfce 4.8 desktop environment X.Org 7.7 more than 36,000 other ready-to-use software packages, built from nearly 17,500 source packages. 對於之前的squeeze使用者,升級還是很簡單的.國內的使用者直接去換一個源就行了在終端依次輸入以下命令,備份老源檔案,直接去163下載新源檔案即刻. #cp /etc/apt/sources.list /etc/apt/squeeze_sources_list #wget http://mirrors.163.com/.help/sources.list.wheezy -O /etc/apt/sources.list 或者直接把複製下面的,並且把老的squeeze的注釋或者刪除掉 [php] deb http://mirrors.163.com/debian wheezy main non-free contrib deb http://mirrors.163.com/debian wheezy-proposed-updates main contrib non-free deb-src http://mirrors.163.com/debian wheezy main non-free contrib deb-src http://mirrors.163.com/debian wheezy-proposed-updates main contrib non-free deb http://mirrors.163.com/debian-security wheezy/updates main contrib non-free deb-src http://mirrors.163.com/debian-security wheezy/updates main contrib non-free deb http://http.us.debian.org/debian wheezy main contrib non-free deb http://non-us.debian.org/debian-non-US wheezy/non-US main contrib non-free deb http://security.debian.org wheezy/updates main contrib non-free 然後#apt-get update #apt-get -y upgrade (這裡漫長的等待,看網速了...) 報錯了 [php] Setting up tzdata (2013b-2) ... Current default time zone: 'Asia/Shanghai' date: invalid date `\033[01;32mMon May \033[01;36m6\033[01;32m \033[01;36m03\033[01;32m\033[01;34m:\033[01;32m\033[01;36m34\033[01;32m\033[01;34m:\033[01;32m\033[01;36m45\033[01;32m UTC \033[01;36m2013\033[0m' dpkg: error processing tzdata (--configure): subprocess installed post-installation script returned error exit status 1 configured to not write apport reports Errors were encountered while processing: tzdata E: Sub-process /usr/bin/dpkg returned an error code (1) 重新安裝和配置tzdata[php] #apt-get install --reinstall tzdata #dpkg-reconfigure tzdata 提示[php] /usr/sbin/dpkg-reconfigure: tzdata is broken or not fully installed 這裡我們查看一下當前的tzdata-java #apt-cache showpkg tzdata-java [php] Package: tzdata-java Versions: 2013b-2 (/var/lib/apt/lists/mirrors.163.com_debian_dists_wheezy_main_binary-amd64_Packages) (/var/lib/apt/lists/http.us.debian.org_debian_dists_wheezy_main_binary-amd64_Packages) (/var/lib/dpkg/status) Description Language: en File: /var/lib/apt/lists/mirrors.163.com_debian_dists_wheezy_main_i18n_Translation-en MD5: 811cf395ae4cc676283711d9bc20443f Description Language: File: /var/lib/apt/lists/mirrors.163.com_debian_dists_wheezy_main_binary-amd64_Packages MD5: 811cf395ae4cc676283711d9bc20443f Reverse Depends: openjdk-6-jre-headless,tzdata-java openjdk-7-jre-headless,tzdata-java openjdk-6-jre-headless,tzdata-java Dependencies: 2013b-2 - tzdata (5 2013b-2) Provides: 2013b-2 - Reverse Provides: 這個依賴的是tzdata 2013b-2這個版本的tzdata於是再查看下tzdata的 [php] #apt-cache showpkg tzdata [php] Package: tzdata Versions: 2013b-2 (/var/lib/apt/lists/mirrors.163.com_debian_dists_wheezy_main_binary-amd64_Packages) (/var/lib/apt/lists/http.us.debian.org_debian_dists_wheezy_main_binary-amd64_Packages) (/var/lib/dpkg/status) Description Language: en File: /var/lib/apt/lists/mirrors.163.com_debian_dists_wheezy_main_i18n_Translation-en MD5: a77a3cc9a67658dd7cfdc6547391b8f8 Description Language: File: /var/lib/apt/lists/mirrors.163.com_debian_dists_wheezy_main_binary-amd64_Packages MD5: a77a3cc9a67658dd7cfdc6547391b8f8 Reverse Depends: util-linux,tzdata 2006c-2 libc6,tzdata 2007k-1 libapache2-mod-php5,tzdata php5-cli,tzdata php5-cgi,tzdata libical0,tzdata postgresql-9.1,tzdata util-linux,tzdata 2006c-2 tzdata-java,tzdata 2013b-2 sugar-tools-0.96,tzdata sugar-session-0.96,tzdata sucrose-0.96,tzdata python3-dateutil,tzdata python3-tz,tzdata python-tz,tzdata python-dateutil,tzdata postgresql-9.1,tzdata php5-fpm,tzdata php5-cli,tzdata php5-cgi,tzdata libphp5-embed,tzdata libapache2-mod-php5filter,tzdata libapache2-mod-php5,tzdata libical0,tzdata libc6,tzdata 2007k-1 Dependencies: 2013b-2 - debconf (18 0.5) debconf-2.0 (0 (null)) libc0.1 (0 (null)) libc0.3 (0 (null)) libc6 (0 (null)) libc6.1 (0 (null)) Provides: 2013b-2 - tzdata-wheezy Reverse Provides: 強制安裝這個版本 [php] #apt-get install tzdata=2013b-2 [php] Reading package lists... Done Building dependency tree Reading state information... Done tzdata is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 1213 not upgraded. 2 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? y Setting up tzdata (2013b-2) ... Current default time zone: 'Asia/Shanghai' Local time is now: Mon May 6 12:52:41 CST 2013. Universal Time is now: Mon May 6 04:52:41 UTC 2013. Run 'dpkg-reconfigure tzdata' if you wish to change it. Setting up tzdata-java (2013b-2) ... 再重設下時區 [php] #dpkg-reconfigure tzdata Current default time zone: 'Asia/Shanghai' Local time is now: Mon May 6 12:53:04 CST 2013. Universal Time is now: Mon May 6 04:53:04 UTC 2013. 然後重複下 [php] #apt-get update #apt-get upgrade 中途會有一些提示,會被修改比如/etc/mime.types 問你是否修改,還是保持原有版本, 預設是保持原有版本. 這裡我選的Y,和包維護者的版本一樣. svn啊.還有sudoers 等等很多的配置,看你後續的設定了. 我都是Y. 然後後面下來修改 漫長的安裝替換升級後, 再升級核心 [php] #apt-get dist-upgrade 這個包就相當多了.大概1~2G,建議晚上通宵升級, 早上完了後重啟.下載完後,又出錯了. [php] E: Could not perform immediate configuration on 'libgstreamer0.10-0'. Please see man 5 apt.conf under APT::Immediate-Configure for details 對於這個問題,我做了以下幾個操作來fix [php] #cd /var/lib/apt/lists 找到下面的檔案non-us.debian.org_debian-non-US_dists_wheezy_non-US_non-free_binary-amd64_Packages然後去/etc/apt/sources.list 注釋掉了以下一行 [php] #deb http://non-us.debian.org/debian-non-US wheezy/non-US main contrib non-free 最後重新安裝上面的libgstreamer[php] #apt-get install --reinstall libgstreamer0.10-0 然後重新執行 #apt-get dist-upgrade 中途會彈出一個軟體更新的差異的內容,這個直接q退出就行了,(你有耐心也可以看完的..) 中途會彈出一些配置的選項視窗, 簡單讀完了看你需要是否需要重啟這些服務, 需要就YES. [php] Configuring libc6 ├───────────────────────────────┐ │ │ │ Failure restarting some services for GNU libc upgrade │ │ │ │ The following services could not be restarted for the GNU libc library upgrade: │ │ │ │ apache2 │ │ │ │ You will need to start these manually by running '/etc/init.d/<service> start'. │ │ 比如這些.可以下來自己單獨配置的.後記: 升級後,從gnome2 升到了gnome3, 還有了xfce . 很多之前安裝的gnome2的小工具都沒了. N卡的驅動裝不上了. 來安裝N卡驅動. 首先去查看下為什麼 N卡的安裝失敗日誌在 /var/lib/dkms/nvidia/310.44/build/make.log 數字那裡是你安裝的N卡驅動版本號碼 [php] *** Unable to determine the target kernel version. *** make: *** [select_makefile] Error 1 提示沒找到核心版本. #/usr/lib/dkms/dkms-autoinstaller start 3.2.0-4-amd64 #sh ./Nvidia.xxxx.run --kernal-source-path=/lib/modules/3.2.0-4-amd64/build/ 提示安裝dkms,否. 接下來和之前安裝N卡一樣. 然後安裝完了後重啟就有了顯卡驅動了. 重啟後進入了gnome3.... 我沒裝xfce.是從gnome2升級上來的..還是有些不習慣. 很多地方不能自訂. 有網友要我的源檔案. 我的加了2個 [php] deb http://mirrors.163.com/debian wheezy main non-free contrib deb http://mirrors.163.com/debian wheezy-proposed-updates main contrib non-free deb-src http://mirrors.163.com/debian wheezy main non-free contrib deb-src http://mirrors.163.com/debian wheezy-proposed-updates main contrib non-free deb http://mirrors.163.com/debian-security wheezy/updates main contrib non-free deb-src http://mirrors.163.com/debian-security wheezy/updates main contrib non-free deb http://http.us.debian.org/debian wheezy main contrib non-free deb http://non-us.debian.org/debian-non-US wheezy/non-US main contrib non-free deb http://security.debian.org wheezy/updates main contrib non-free deb http://ppa.launchpad.net/ubuntu-wine/ubuntu lucid main deb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main