ubuntu-linux 软件安装参考指南
文章目錄
- Linux 軟件源
- deb 軟件安裝
- 工具軟件
- nvidia工具軟件
- caffe的依賴安裝
- 軟件安裝List
- 1 sublime Text3 (3216)
- 2 Qt5.9.1 安裝
- 3 Qground Control 編譯安裝
- 4 SMPlayer 安裝
- 5 mNetAssist 安裝
- 6 codeblocks C++ IDE 安裝
- 7 Roboware Studio 安裝
- 9 FFTW 安裝
- 10 openCV3.30安裝
- OpenCV-with-CUDA
- 11 kubuntu ubuntu-server桌面
- [12 x11vnc 安裝與配置](http://blog.csdn.net/CSDNhuaong/article/details/78406838)
- 13 x2go teamview安裝與使用
- 14通過vncserver遠程登陸
- 15 通過samba進行文件傳輸
- 16 通過gdebi軟件來安裝deb軟件
- 17 nmap 網絡端口掃描軟件
- 20 java jdk環境配置
- 21 steam 游戲平臺,強化學習
- 22 minicom cutecom 串口調試工具
- 23 google gflag glog安裝方式
- 24 gcc7 (C++17的安裝 以及使用過程中的切換)
- 25 安裝多版本python并設置優先級
- 網易云音樂
- Eigen3
##軟件安裝目錄表
| 1 | sublime Text3 | 跨平臺代碼編輯查看 |
| 2 | Qt 5.7.1 | 代碼編譯的IDE開發環境 |
| 3 | Qground Control | 多平臺的無人機地面站軟件 |
| 4 | SMPlayer | 音頻/視頻播放器 |
| 5 | mNetAssist | Linux網絡調試助手 |
| 6 | codeblocks | 跨平臺C++ IDE |
| 7 | Roboware Studio | ROS IDE開發平臺 |
| 8 | ||
| 9 | FFTW | 一個C子庫的DFT |
| 10 | openCV3.30 | 跨平臺計算機視覺庫 |
| 11 | kubuntu | ubuntu-server桌面 |
| 12 | x11vnc | windows遠程登錄Linux |
| 13 | X2Go teamview | Linux遠程登錄Linux |
| 14 | vncserver | VNC遠程登錄 桌面訪問 |
| 15 | samba | 文件傳輸 |
| 16 | gdebi | deb軟件的安裝工具 |
| 17 | nmap | 網絡端口掃描軟件 |
| 18 | kazam | 屏幕錄制軟件 |
| 19 | Visual Studio Code | 微軟精簡的跨平臺多語言開發環境 |
| 20 | java JDK 環境配置 | |
| 21 | steam | 游戲平臺,強化學習用 |
| 22 | minicom cutecom | 串口調試工具 |
| 23 | google gflag 動態庫的安裝方式 | |
| 24 | gcc 7的安裝以及與gcc 5的切換 |
Linux 軟件源
Linux 軟件源,它就相當于軟件庫,需要什么軟件,只要記得正確的軟件名并且確定在ubuntu下肯定有的軟件,就可以使用命令來安裝軟件的 命令是:sudo apt -get install 軟件名 ,但要確定源里有沒有這個軟件,也就是說軟件庫里有沒有這個軟件,如果沒有,那就要添加源了。
首先打開終端輸入,
sudo gedit /etc/apt/sources.list
sources.list就是添加源的文件,只要把需要的源加到最后一行就行了,然后保存。
回到終端下,更新一下軟件列表,輸入
sudo apt-get update
每當使用 add-apt-repository 命令添加倉庫時,它都將保存在 /etc/apt/sources.list 中。
要從 Ubuntu 及其衍生版中刪除軟件倉庫,只需打開 /etc/apt/sources.list 文件并查找倉庫名字并將其刪除即可
deb 軟件安裝
sudo dpkg -i ****.deb ## 如果缺少依賴 sudo apt-get install -fdep包文件生成的過程
cd Build cmake .. make rm *.deb cpack -G DEB sudo dpkg -i *.debgitbub下載特定分支的代碼
git clone --branch `tar` ****//下完之后 git checkout -b `tar`工具軟件
搜狗輸入法、福昕閱讀器,sublime Text
nvidia工具軟件
nvidia顯卡驅動
利用JetPack給宿主機配置環境
- NVIDIA System Profiler is a tool for diagnosing and optimizing applications’ CPU and GPU workload and interactions.
- JetPack Documentation including user guides, best practices, and manuals for various tools and middleware.
- OpenCV 3.3.1for Host 16.04
- **NVIDIA VisionWorks Toolkit 1.6 ** (VisionWorks VisionWorksPlus/SFM VisionWorksObjectTracker VisionWorks Reference)is a CUDA accelerated software development package for computer vision (CV) and image processing. The toolkit is designed to provide a production-quality, standard interface that implements and extends the OpenVX standard, enabling high performance computer vision applications on NVIDIA Tegra devices.
- CUDA Toolkit 9.0 on Host for Cross Compiling. the NVIDIA CUDA Toolkit provides a comprehensive development environment for C and C++ developers building GPU-accelerated applications.
caffe的依賴安裝
先屏蔽掉 python 中 anaconda的環境變量
protobuf
下載指定版本的tar.gz包 https://github.com/google/protobuf
環境配置
(1) vim /etc/profile,添加
export PATH=$PATH:/usr/local/protobuf/bin/
export PKG_CONFIG_PATH=/usr/local/protobuf/lib/pkgconfig/
保存執行,source /etc/profile。同時在~/.profile中添加上面兩行代碼,否則會出現登錄用戶找不到protoc命令。
(2) 配置動態鏈接庫
vim /etc/ld.so.conf,在文件中添加/usr/local/protobuf/lib(注意: 在新行處添加),然后執行命令: ldconfig
protoc --version
DIGITS 訓練工具
##源碼安裝 養成一個好習慣
./configure --prefix=/usr/local/softname make sudo make install軟件安裝List
1 sublime Text3 (3216)
sudo add-apt-repository ppa:webupd8team/sublime-text-3
sudo apt-get-update
sudo apt-get install sublime-text-installer
安裝完成 打開 > sublime-text
注冊 help --> input lisence
—– BEGIN LICENSE —–
TwitterInc
200 User License
EA7E-890007
1D77F72E 390CDD93 4DCBA022 FAF60790
61AA12C0 A37081C5 D0316412 4584D136
94D7F7D4 95BC8C1C 527DA828 560BB037
D1EDDD8C AE7B379F 50C9D69D B35179EF
2FE898C4 8E4277A8 555CE714 E1FB0E43
D5D52613 C3D12E98 BC49967F 7652EED2
9D2D2E61 67610860 6D338B72 5CF95C69
E36B85CC 84991F19 7575D828 470A92AB
—— END LICENSE ——
2 Qt5.9.1 安裝
打開中科大Qt 鏡像源、
下載qt-opensource-linux-x64-5.9.1.run 【因為編譯QGC要用這個版本】
chmod 777 qt-opensource-linux-x64-5.9.1.run
./qt-opensource-linux-x64-5.9.1.run
直接安裝在默認的$HOME/Qt5.9.1
export QT_SELECT=qt5
qtchooser -print-env
QT_SELECT=“qt5”
QTTOOLDIR="/home/hualong/Qt/5.7/gcc_64/bin" 【!!!信息不對,要修改】
QTLIBDIR="/usr/lib/x86_64-linux-gnu"
sudo vim /usr/lib/x86_64-linux-gnu/qtchooser/5.conf
第一行改為 /home/hualong/Qt5.9.1/5.9.1/gcc_64/bin
再次查看qtchooser -print-env
qmake -v
QMake version 3.1
Using Qt version 5.9.1 in /home/hualong/Qt5.9.1/5.9.1/gcc_64/lib 【OK】
3 Qground Control 編譯安裝
下載源碼 git clone --recursive https://github.com/mavlink/qgroundcontrol.git
查看Readme 文件 它會告訴你編譯所需的條件
Building using Qt Creator
- Launch Qt Creator and open the qgroundcontrol.pro project.
- Select the appropriate kit for your needs:
- OSX: Desktop Qt 5.9.1 clang 64 bit
- Ubuntu: Desktop Qt 5.9.1 GCC bit 【這就是為什么要用Qt591】
- Windows: Desktop Qt 5.9.1 MSVC2015 32bit
- Android: Android for armeabi-v7a (GCC 4.9, Qt 5.9.1)
用Qt5.9.1打開qgroundcontrol文件夾下的工程文件qgroundcontrol.pro
QGC的編譯使用Qt5.9.1,必須在工程設置中選擇Qt 5.9.1的GCC
Build dictionary 選擇一個與qgroundcontrol 同級的文件夾 如Qground_Build
點擊左下角小錘子,build即可
從Qground_Build 文件夾下找到 程序,運行即可【OK】
如果缺少SDL2
sudo apt-get install libsdl2-dev
編譯完成,如果缺少串口權限
sudo usermod -a -G dialout $USER
sudo apt-get remove modemmanager
參考安裝鏈接 QT5 和 QGC
4 SMPlayer 安裝
sudo add-apt-repository ppa:rvm/smplayer
sudo apt-get update
sudo apt-get install smplayer
運行 smplayer
5 mNetAssist 安裝
QT4.8.5編寫了一個網絡調試助手
下載鏈接
6 codeblocks C++ IDE 安裝
sudo apt-get install codeblocks其他幾個linux 下C/C++集成開發環境
7 Roboware Studio 安裝
下載 RoboWare Studio 最新版,雙擊下載的.deb 文件即可完成安裝
卸載 sudo apt-get remove roboware-studio
9 FFTW 安裝
http://www.fftw.org/
./configure makemake install10 openCV3.30安裝
cd ~/opencv-x.x.x
mkdir release
cd release
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local …
make
(make時出錯,說找不到gst/video下的頭文件 跟編譯QGC,類似,把gst頭文件復制過去)
sudo make install
添加openCV庫的路徑
vim /etc/ld.so.conf
添加 /usr/local/lib
添加環境變量
vim /etc/profile
添加 export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
卸載:
找到自己編譯源碼的文件夾 這里 cd release 你的可能是build
make uninstall
cd …
sudo rm -r build
sudo rm -r /usr/local/include/opencv2
/usr/local/include/opencv
/usr/include/opencv
/usr/include/opencv2
/usr/local/share/opencv
/usr/local/share/OpenCV
/usr/share/opencv
/usr/share/OpenCV
/usr/local/bin/opencv*
/usr/local/lib/libopencv*
//下載 //下載相應版本的opencv opencv_contrib git clone --branch 3.3.1 https://github.com/opencv/opencv cd git checkout -b 3.3.1 cd .. git clone --branch 3.3.1 https://github.com/opencv/opencv_contrib.git cd git checkout -b 3.3.1 cd ..//安裝 cmake \ > -D CMAKE_BUILD_TYPE=release \ > -D CMAKE_INSTALL_PREFIX=/usr/local \ > -D CUDA_GENERATION=Pascal \ #Pascal架構 > -D CUDA_ARCH_BIN=6.1 -D CUDA_ARCH_PTX=6.1 \ ## 顯卡計算能力 > -D WITH_CUDA=ON > -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules ../opencv-3.3.1make ##編譯 ## 加上 -D cuda編譯選項,不然可能會報錯,根據自己顯卡架構調整//卸載 make uninstall cd .. sudo rm -r build sudo rm -r /usr/local/include/opencv2 /usr/local/include/opencv /usr/include/opencv /usr/include/opencv2 /usr/local/share/opencv /usr/local/share/OpenCV /usr/share/opencv /usr/share/OpenCV /usr/local/bin/opencv* /usr/local/lib/libopencv*
OpenCV-with-CUDA
tar -xvf opencv-3.4.1.tar && rm opencv-3.4.1.tar cd opencv-3.4.1 mkdir build cd build cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_CUDA=ON -D ENABLE_FAST_MATH=ON -D CUDA_FAST_MATH=ON -D WITH_CUBLAS=1 -D WITH_NVCUVID=on -D CUDA_GENERATION=Auto .. make -j* make install編譯OpenCV3.4.6出現 fatal error: opencv2/xfeatures2d/cuda.hpp: No such file or directory
在編譯stitching模塊時會提示:
找不到cuda.hpp即matchers.hpp:52:42: fatal error: opencv2/xfeatures2d/cuda.hpp: No such file or directory
opencv/modules/stitching/CMakeLists.txt文件中加入一條語句使其include opencv_contrib/modules/xfeatures2d/include,可以是絕對路徑,如
INCLUDE_DIRECTORIES(/home/name/software/opencv-3.4.0/opencv_contrib-3.4.0/modules/xfeatures2d/include)
編譯錯誤: fatal error: vgg_generated_120.i: No such file or directory
手動下載缺失的文件 文件下載鏈接
把文件復制到 opencv_contrib/modules/xfeatures2d/src/
cuda錯誤:
TX1/TX2 Building OpenCV for Tegra with CUDA
OPENCV學習教程
11 kubuntu ubuntu-server桌面
針對 ubuntu server 14.04 LTS
sudo apt-get install xinit
sudo apt-get install gdm //GNOME 后面選擇也選gdm
sudo apt-get install kubuntu-desktop
reboot
12 x11vnc 安裝與配置
在 Linux 世界中,理所當然設置遠程桌面有很多選擇,支持許多協議(例如 RDP、RFB、NX) 和服務器/客戶端實現(例如 TigerVNC、RealVNC、FreeNX、x2go、X11vnc、TeamViewer 等等)。
這當中有個出色的產品叫做 X2Go,它是一個基于 NX(譯者注:通過計算機網絡顯示遠程桌面環境的一種技術,可參考 Wiki)的遠程桌面服務器和客戶端的開源(GPLv2)實現。
windows linux可視化客戶端下載鏈接
https://www.realvnc.com/en/connect/download/viewer/
13 x2go teamview安裝與使用
sudo add-apt-repository ppa:x2go/stable
sudo apt-get update
apt-cache search x2go
sudo apt-get install x2goserver x2goserver-xsession 【服務器端】
sudo apt-get install x2goclient 【客戶端】
如何在 Linux 上使用 x2go 設置遠程桌面
teamview
下載系統對應的teamview https://www.teamviewer.com/cn/%E4%B8%8B%E8%BD%BD/linux/
安裝依賴
sudo apt-get install libjpeg62:i386 libxinerama1:i386 libxrandr2:i386 libxtst6:i386 ca-certificates
sudo apt-get install -f
sudo dpkg -i teamviewer_12.0.76279_i386.deb
14通過vncserver遠程登陸
解決 有時ssh啟動不了的問題
x11vnc -auth /var/run/lightdm/root/:0
安裝VNCserver
apt-get install x11vnc [安裝]
x11vnc –storepasswd 【設置密碼】
x11vnc -forever -shared -rfbauth ~/.vnc/passwd 【啟動服務】
windows端通過RealVNC Viewer 軟件登陸 【首先保證兩個網絡能Ping通】
注意啟動后的一個桌面號 是0 是1 還是什么
The VNC desktop is: tegra-ubuntu:1
PORT=5901
######################################################
以上的啟動方式,重啟后或者把這個終端關閉后,就會失效了,所以如何配置成開機自啟動
sudo cp ~/.vnc/passwd /etc/x11vnc.pass
start on login-session-start
script
x11vnc -display :0 -auth /var/run/lightdm/root/:0 -forever -bg -o /var/log/x11vnc.log -rfbauth /etc/x11vnc.pass -rfbport 5900
end script
IP:0 [ip:桌面編號]
使用 IP:5900**(ip:端口)**
15 通過samba進行文件傳輸
安裝 samba
sudo apt-get install samba
配置 打開 /etc/samba/smb.conf文件 在尾部添加如下內容
[home]
path = /home
available = yes
browseable = yes
public = yes
writeable = yes
設置賬號的密碼我們的TK1的默認用戶就是ubunt
sudo smbpasswd -a ubuntu
重啟Samba服務
/etc/init.d/smbd restart
##########################################
Windows端通過網絡訪問Samba服務器 【首先保證兩個網絡能Ping通】
1、按下win7的快捷鍵(WIN+R)打開“運行”工具
例如 \192.168.0.2\home
Samba服務重啟后還是會有的。
如果宿主機Ubuntu也想用Samba訪問TK1Ubuntu,可以在宿主機上安裝Samba client
sudo apt-get install smbclient smbclient //目標機IP/Share-dir -u samba_user-name smbclient //192.168.0.100/home -u ubuntu //回車后,會提示輸入admin的密碼.samba的使用
[global]
workgroup =指定工作組或域
server string =描述
security = 指定安全模式
hosts allow = 限定主機訪問
log file = 指定日志存放位置
[home]
comment = 描述
browseable = no 只看到自己的宿主目錄 其他的不可見
writable = yes 可寫
16 通過gdebi軟件來安裝deb軟件
sudo apt-get install gdebi
使用 右擊deb,選擇gedbi 來安裝
17 nmap 網絡端口掃描軟件
sudo add-apt-repository ppa:pi-rho/security
sudo apt-get update
sudo apt-get install nmap
卸載nmap命令:
sudo apt-get remove nmap
移除PPA命令:
sudo apt-get install ppa-purge
sudo ppa-purge ppa:pi-rho/security
20 java jdk環境配置
1.首先要去下載好JDK,Java SE 8的官方網址是http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
根據自己的系統版本來選擇是要使用32位版還是64位版。Linux提供了兩種安裝方式一個是.rpm,另一個是.tar.gz,我所使用的是.tar.gz。在下載前不要忘了選擇Accept License Agreement。
2.可以使用下面的命令來查看自己的系統是32位還是64位
getconf LONG_BIT
3.接下來我們對下載的文件進行解壓
4.然后我們來新建一個目錄,并將解壓好的文件移動過去
`
mkdir /usr/java
mv ./jdk1.8.0_xx/usr/java
5.然后我們來設置環境變量,這里我們需要修改/etc/profile文件
6.在文件最后添加下面的內容
添加完成后,使環境變量生效。
source /etc/profile
我們可以在終端中輸入java來檢測是否配置成功
java
如果配置成功便會顯示提示信息
用法: java [-options] class [args…]
java -version
21 steam 游戲平臺,強化學習
sudo apt-get install libgl1-mesa-dri:i386 libgl1-mesa-glx:i386 libc6:i386 -y
sudo apt-get install python-apt
下載安裝 steam
解決 gtk問題
sudo apt-get install libcanberra-gtk-module:i386
22 minicom cutecom 串口調試工具
sudo apt-get install minicom cutecom23 google gflag glog安裝方式
git clone https://github.com/google/glog sudo apt-get install autoconf automake libtool ./autogen.sh ./configure --prefix=/usr/local/glog make -j* sudo make installgit clone https://github.com/gflags/gflags mkdir build cd build cmake -D CMAKE_INSTALL_PREFIX=/usr/local/gflag .. make make test make install ## 安裝動態庫 cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DBUILD_SHARED_LIBS=ON -DGFLAGS_NAMESPACE=google -G "Unix Makefiles" ../make sduo make install24 gcc7 (C++17的安裝 以及使用過程中的切換)
sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install gcc-7 g++-7use the following command to check your gcc compilers
$ ls -lh /usr/bin/g++*for ubuntu 14.04:
$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8for ubuntu 16.04:
## 設置gcc5的優先級 $ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5then
## 設置gcc7的優先級 $ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 70 --slave /usr/bin/g++ g++ /usr/bin/g++-7use the folling command to change the default compiler (choose 0 as default)
## 切換系統GCC的版本 $ sudo update-alternatives --config gcccheck your current gcc compiler
$ gcc --version ## add gcc 4.9 sudo apt-get install gcc-4.9 g++-4.9 sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 50 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9 sudo update-alternatives --config gcc25 安裝多版本python并設置優先級
## instll python3.6 并設置一個高于python3.5的優先級 sudo add-apt-repository ppa:jonathonf/python-3.6 sudo apt-get update sudo apt-get install python3.6### python3.6 高于 python3.5, 所以默認python3是 python3.6 sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.5 1 sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 2###python3 高于 python2, 所以默認python3 sudo update-alternatives --install /usr/bin/python python /usr/bin/python2 100 sudo update-alternatives --install /usr/bin/python python /usr/bin/python3 150網易云音樂
網易云-Ubuntu16.04下載地址:
網易云 deepin15(64位)下載地址
sudo dpkg -i netease-cloud-music_1.1.0_amd64_ubuntu.deb
sudo apt-get -f install
sudo netease-cloud-music
如果你點擊軟件圖標打不開網易云客戶端,試著在終端執行:
sudo gedit /usr/share/applications/netease-cloud-music.desktop
Exec=netease-cloud-music --no-sandbox %U
Eigen3
Eigen3是一個矩陣運算的庫,只包含頭文件
sudo apt-get install libeigen3-dev
總結
以上是生活随笔為你收集整理的ubuntu-linux 软件安装参考指南的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: jmeter5.3下载地址及安装指南
- 下一篇: 网络通信知识简介