歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux技術 >> Caffe安裝筆記一:VMWare11+Ubuntu14.04搭建Linux安裝環境

Caffe安裝筆記一:VMWare11+Ubuntu14.04搭建Linux安裝環境

日期:2017/3/3 13:59:42   编辑:Linux技術
  這一篇先介紹caffe運行環境的搭建,新手,稍微花了點時間,同時也是win8兼容性差的問題。
  首先,簡單說說虛擬機的選擇。虛擬機盡量選擇vmware workstation,不要用player,因為快照功能實在是十分必須的。win8和vm12兼容性很差,所以台式機上裝的是wmware11。筆記本是win7,裝的vm12,不過在安裝虛擬機的時候記得要把類型選擇為兼容wmware11的類型,這樣一旦出現不得不克隆系統的情況,也能夠很好的在兩平台間移植。至於virtual box,個人簡單試用了一下,感覺不是很好用,所以就放棄了。
  linux版本盡量選擇主流版本,一方面是穩定性會好些,另一方面出現問題查資料方便得多,一般問題網上應該都能找到答案。關於這點,最初看到這個說法時我是不屑一顧的,但是真的裝過幾個版本之後就發現,不同版本之間,會有很多差異,有的差異可能會耗費掉你不少的時間。
  我曾經安裝過xubuntu14.04,雖然說是ubuntu的變體版本,而且都是14.04,但是裝好虛擬機之後,xubuntu14.04想要安裝vmware-tools需要補充安裝不少組件,才能夠使用文件共享的功能,而ubuntu14.04不需要我手工操作任何操作,12.04要手動安裝。這就是差別。
  然後來進行linux下的一些基本配置。
1. 添加國內源並更新源列表
sudo cp /etc/apt/sources.list/etc/apt/sources.list_backup
sudo gedit /etc/apt/sources.list # 備份並編輯源列表

  作為新手小白,起初經常忘了加sudo。我覺得無論報錯與否,linux下面都請仔細閱讀返回信息,裡面其實有各種提示,比如,如果說permissiondenied,那你就知道是權限不夠,要加sudo。另外,安裝軟件一定要看返回信息,千萬別報錯了還不知道,以為裝好了,繼續下一步,最後發現問題時回過頭來卻不知道問題出在哪一步(這都是我的血淚史)。
  然後文件中添加如下內容,最後把之前默認的那些源都刪掉,否則更新源列表的時候會下載那些列表,不但用處不大,而且很費時間。
需要注意這裡的trusty代表的意思是14.04,如果是其他版本的這個地方會有不同,所以如果你copy的是其他版本的表,記得把相應位置的詞替換成trusty,如果你是其他版本的ubuntu,則把trusty替換為相應的版本名稱。具體可以到官網上查看,具體查看地址為:
  http://wiki.ubuntu.org.cn/源列表
  這裡僅選擇三個主要的來源。如果需要其他源可以自行百度。
# 官方源:
debhttp://archive.ubuntu.com/ubuntu/trusty main restricted universe multiverse
debhttp://archive.ubuntu.com/ubuntu/trusty-security main restricted universe multiverse
debhttp://archive.ubuntu.com/ubuntu/trusty-updates main restricted universe multiverse
debhttp://archive.ubuntu.com/ubuntu/trusty-proposed main restricted universe multiverse
debhttp://archive.ubuntu.com/ubuntu/trusty-backports main restricted universe multiverse
deb-srchttp://archive.ubuntu.com/ubuntu/trusty main restricted universe multiverse
deb-srchttp://archive.ubuntu.com/ubuntu/trusty-security main restricted universe multiverse
deb-srchttp://archive.ubuntu.com/ubuntu/trusty-updates main restricted universe multiverse
deb-srchttp://archive.ubuntu.com/ubuntu/trusty-proposed main restricted universe multiverse
deb-srchttp://archive.ubuntu.com/ubuntu/trusty-backports main restricted universe multiverse
# 163源:
debhttp://mirrors.163.com/ubuntu/trusty-security main restricted universe multiverse
debhttp://mirrors.163.com/ubuntu/trusty-updates main restricted universe multiverse
debhttp://mirrors.163.com/ubuntu/trusty-proposed main restricted universe multiverse
debhttp://mirrors.163.com/ubuntu/trusty-backports main restricted universe multiverse
deb-srchttp://mirrors.163.com/ubuntu/trusty main restricted universe multiverse
deb-srchttp://mirrors.163.com/ubuntu/trusty-security main restricted universe multiverse
deb-srchttp://mirrors.163.com/ubuntu/trusty-updates main restricted universe multiverse
deb-srchttp://mirrors.163.com/ubuntu/trusty-proposed main restricted universe multiverse
deb-srchttp://mirrors.163.com/ubuntu/trusty-backports main restricted universe multiverse
# 阿裡源:
debhttp://mirrors.aliyun.com/ubuntu/trusty main restricted universe multiverse
debhttp://mirrors.aliyun.com/ubuntu/trusty-security main restricted universe multiverse
debhttp://mirrors.aliyun.com/ubuntu/trusty-updates main restricted universe multiverse
debhttp://mirrors.aliyun.com/ubuntu/trusty-proposed main restricted universe multiverse
debhttp://mirrors.aliyun.com/ubuntu/trusty-backports main restricted universe multiverse
deb-srchttp://mirrors.aliyun.com/ubuntu/trusty main restricted universe multiverse
deb-srchttp://mirrors.aliyun.com/ubuntu/trusty-security main restricted universe multiverse
deb-srchttp://mirrors.aliyun.com/ubuntu/trusty-updates main restricted universe multiverse
deb-srchttp://mirrors.aliyun.com/ubuntu/trusty-proposed main restricted universe multiverse
deb-srchttp://mirrors.aliyun.com/ubuntu/trusty-backports main restricted universe multiverse
# 搜狐源:
debhttp://mirrors.sohu.com/ubuntu/ trustymain restricted universe multiverse
debhttp://mirrors.sohu.com/ubuntu/trusty-security main restricted universe multiverse
debhttp://mirrors.sohu.com/ubuntu/trusty-updates main restricted universe multiverse
debhttp://mirrors.sohu.com/ubuntu/trusty-proposed main restricted universe multiverse
debhttp://mirrors.sohu.com/ubuntu/trusty-backports main restricted universe multiverse
deb-srchttp://mirrors.sohu.com/ubuntu/trusty main restricted universe multiverse
deb-srchttp://mirrors.sohu.com/ubuntu/trusty-security main restricted universe multiverse
deb-srchttp://mirrors.sohu.com/ubuntu/trusty-updates main restricted universe multiverse
deb-srchttp://mirrors.sohu.com/ubuntu/trusty-proposed main restricted universe multiverse
deb-srchttp://mirrors.sohu.com/ubuntu/trusty-backports main restricted universe multiverse
然後執行以下命令。網上有人說一定要update,我不知道為什麼,不過還是照著做了。
sudo apt-get update
還有upgrade,這個是升級軟件包,並無必要。試過一次,把火狐之類的都給升級了。
Copyright © Linux教程網 All Rights Reserved