![Kubuntu 13.04 安裝程式在手動分割區設定時崩潰](https://rvso.com/image/1114956/Kubuntu%2013.04%20%E5%AE%89%E8%A3%9D%E7%A8%8B%E5%BC%8F%E5%9C%A8%E6%89%8B%E5%8B%95%E5%88%86%E5%89%B2%E5%8D%80%E8%A8%AD%E5%AE%9A%E6%99%82%E5%B4%A9%E6%BD%B0.png)
我喜歡 kubuntu,但當我順利安裝新版本的那一天,就是我在街上裸舞的那一天:-(
嘗試在我的 Dell XPS 上安裝 13.04。安裝程式啟動正常,但當我進行硬碟設定時,出現問題:安裝程式崩潰。我有兩個硬碟,總共12個分割區。當我選擇手動安裝時,我可以毫無問題地配置前 5 個分割區,但是當我到達第一個硬碟上的第 6 個分割區時,安裝程式崩潰並出現以下錯誤:
Installer crashed
/usr/lib/ubiquity/ubiquity/frontend/kde_components/PartitionModel.py", line 111, in parent parentItem = childItem.parent()
AttributeError: 'Partition' object has no attribute 'parent'
我甚至嘗試不配置磁碟 1 上的第 6 個分割區,而是移動到磁碟 2。當我嘗試在那裡配置分割區時,安裝程式也會崩潰,但沒有錯誤(只是黑畫面)
有什麼建議麼?
答案1
我遇到了同樣的錯誤,在找不到解決方案後,我決定自己修復它。我做了什麼:
打開 konsole,成為 root 並前往 /usr/lib/ubiquity/ubiquity/frontend/kde_components/
sudo -s cd /usr/lib/ubiquity/ubiquity/frontend/kde_components
開啟PartitionModel.py進行編輯:
nano PartitionModel.py
導航至第 111 行(使用 pageUp、Down 和遊標鍵導航,並使用 Ctrl-c 檢查目前位置;nano 不是最簡單的)。你應該在那裡找到類似的東西:
def parent(self, index): if not index.isValid(): return QtCore.QModelIndex() childItem = index.internalPointer() parentItem = childItem.parent() if parentItem == self.rootItem: return QtCore.QModelIndex() return self.createIndex(parentItem.row(), 0, parentItem)
「parentItem = childItem.parent()」行應該是第 111 行。
try: parentItem = childItem.parent() except AttributeError: parentItem = self.rootItem
現在上面的方法應該如下所示:
def parent(self, index): if not index.isValid(): return QtCore.QModelIndex() childItem = index.internalPointer() try: parentItem = childItem.parent() except AttributeError: parentItem = self.rootItem if parentItem == self.rootItem: return QtCore.QModelIndex() return self.createIndex(parentItem.row(), 0, parentItem)
確保只使用空格而不是製表符
重新啟動安裝程序,它現在應該不會崩潰...
為我工作,YMMV...