一般情況下我們都是使用apt-get install進行軟件安裝,但是有時候也有可直接install的文件例如.deb.
接下來就記錄一下.dep軟件的安裝與卸載
安裝:
直接找到軟件,雙擊就可以進行安裝。
或者使用命令
sudo dpkg -i xxxxx.deb
但是有時候這個安裝會出現軟件版本啊,依賴包關系安裝失敗,會有數據殘留。
所以就用到了卸載
先找到軟件的名稱:whereis,which,find,grep都可以的
可以直接使用dpkg命令進行卸載,這叫誰污染誰治理。
dpkg -l |grep xxx #xxx就是安裝的軟件名
然后找到之后,使用下面的方法進行卸載
sudo dpkg --purge xxxx rm -rf ~/.local/share/xxxx
這樣的話就徹底卸載了。
以安裝teamviewer為例子,介紹ubuntu下teamviewer的安裝過程。
1.先去官網下載teamviewer,https://download.teamviewer.com/download/linux/teamviewer_amd64.deb
2.然后執行安裝命令
sudo dpkg -i teamviewer_13.0.5693_amd64.deb
竟然報錯了,報錯信息如下:

Selecting previously unselected package teamviewer. (Reading database ... 253632 files and directories currently installed.) Preparing to unpack teamviewer_13.0.5693_amd64.deb ... Unpacking teamviewer (13.0.5693) ... dpkg: dependency problems prevent configuration of teamviewer: teamviewer depends on qtdeclarative5-controls-plugin (>= 5.5) | qml-module-qtquick-controls (>= 5.5); however: Package qtdeclarative5-controls-plugin is not installed. Package qml-module-qtquick-controls is not installed. teamviewer depends on qtdeclarative5-dialogs-plugin (>= 5.5) | qml-module-qtquick-dialogs (>= 5.5); however: Package qtdeclarative5-dialogs-plugin is not installed. Package qml-module-qtquick-dialogs is not installed. dpkg: error processing package teamviewer (--install): dependency problems - leaving unconfigured Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ... Processing triggers for desktop-file-utils (0.22-1ubuntu5.1) ... Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160824-0ubuntu1) ... Rebuilding /usr/share/applications/bamf-2.index... Processing triggers for mime-support (3.59ubuntu1) ... Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ... Errors were encountered while processing: teamviewer
執行過程中一般都會失敗,這是因為你X86架構64位的操作系統,必須下載的64位的軟件,然后這個軟件要依賴32位架構的包,所以要安裝下依賴。
3.安裝依賴
#添加架構依賴 sudo dpkg --add-architecture i386 #更新軟件庫 sudo apt-get update
4.執行強制安裝
sudo apt-get -f install
5.接下來就可以安裝
sudo dpkg -i teamviewer_13.0.5693_amd64.deb
6.修改配置文件
#停止teamviewer sudo teamviewer --daemon stop #通過vim修改配置文件(需要管理員權限) sudo vim /opt/teamviewer/config/global.conf #添加下面兩行(一般添加配置都是在文末) [int32] EulaAccepted = 1 [int32] EulaAcceptedRevision = 6
7.啟動teamviewer並設置密碼
#啟動teamviewer teamviewer --daemoon start #獲取Id(貌似沒啥鳥用,可以忽略) teamviewer --info print id #設置密碼(這個密碼不知道是不是登陸的密碼,我是在注冊的賬號) sudo teamviewer --passwd xxxxxxxx
8.然后你就可以愉快的打開teamviewer,進行遠程控制操作了。