为gedit添加中文显示支持,否则gedit中文显示不正常:
终端中输入如下命令:
gsettings set org.gnome.gedit.preferences.encodings candidate-encodings "['GB18030', 'GB2312', 'GBK', 'UTF-8', 'BIG5', 'CURRENT', 'UTF-16']"
sudo gedit /etc/modprobe.d/blacklist.conf
在最后行加入:
blacklist nouveau
options nouveau modeset=0
输入: sudo update-initramfs -u 更新内核镜像
lspci | grep nouveau
如果没有内容 ,说明禁用成功
7)重启后可正常进入界面
8)终端输入:sudo passwd 设置su密码
“源”更新:
sudo apt-get update
sudo apt-get -y install g++
sudo apt-get -y install git
//---------------------------------------------------------------------------------------------------------------
&6.安装opencv,注意版本为2.4.13,同时注意,务必要在cuda之前安装opencv
//---------------------------------------------------------------------------------------------------------------
https://github.com/jayrambhia/Install-OpenCV
chmod a+x *.sh //给所有.sh文件赋予执行权限
sudo ./opencv2_4_10.sh
sudo apt-get remove --purge nvidia* //删除以前安装的英伟达显卡组件
终端输入以下代码:
su
service lightdm stop % 关闭图形界面,上面命令虽屏幕黑,但未关闭图形界面
cd 命令进入NVIDIA-Linux-x86_64-390.87.run.包所在位置 需要切换到root
chmod +x NVIDIA-Linux-x86_64-390.87.run
./NVIDIA-Linux-x86_64-390.87.run --no-opengl-files (不加这句会出现循环登录,循环登录的主要原因是opengl与nvidia显卡冲突)
选择的时候有一个很重要的部分:在选择是否更新Xserver时选择no,否则分辨率出错
重启系统,输入 lspci | grep -i nvidia 或 nvidia-smi 确认安装是否成功,成功会打印出显卡信息。
先进入安装包目录,修改运行权限,然后执行。安装代码:
chmod +x *.run
./cuda_9.0.176_384.81_linux.run --no-opengl-libs
安装的时候,要让你先看一堆文字(EULA),我们直接不停的按空格键到100%,
-----------------
Do you accept the previously read EULA?
accept/decline/quit: accept
Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 384.81?
(y)es/(n)o/(q)uit: n
Install the CUDA 9.0 Toolkit?
(y)es/(n)o/(q)uit: y
Enter Toolkit Location
[ default is /usr/local/cuda-9.0 ]:
/usr/local/cuda-9.0 is not writable.
Do you wish to run the installation with 'sudo'?
(y)es/(n)o: yes
Please enter your password:
Do you want to install a symbolic link at /usr/local/cuda?
(y)es/(n)o/(q)uit: yes
Install the CUDA 9.0 Samples?
(y)es/(n)o/(q)uit: yes
Enter CUDA Samples Location
[ default is /home/poa ]:
Installing the CUDA Toolkit in /usr/local/cuda-9.0 ...
Missing recommended library: libXmu.so
Installing the CUDA Samples in /home/poa ...
Copying samples to /home/poa/NVIDIA_CUDA-9.0_Samples now...
Finished copying samples.
注意 显卡驱动不可以装
在安装中,安装包的默认路径,不建议修改,其默认路径是:
bin文件安装到:
/usr/local/cuda-9.0/bin
lib文件安装到:
/usr/local/cuda-9.0/lib64
demo文件安装到:
/home/poa
sudo gedit ~/.bashrc
在文件末尾输入:
export PATH=/usr/local/cuda-9.0/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda-9.0/lib64:$LD_LIBRARY_PATH
保存退出后在终端输入命令:
source ~/.bashrc
sudo ldconfig
安装完成后,重启
reboot
验证安装是否正确
lspci | grep -i nvidia
或者 sudo nvidia-smi 验证
cuDNN软件库的安装,cuDNN软件库是nvidia在cuda基础上专门针对DNN优化的第三方算法包
tar -zxvf cudnn-9.0-linux-x64-v7.3.1.20.tgz
sudo cp cuda/include/cudnn.h //usr/local/cuda-9.0/include/
sudo cp cuda/lib64/libcudnn* /usr/local/cuda-9.0/lib64/
sudo chmod a+r /usr/local/cuda-9.0/include/cudnn.h
sudo chmod a+r /usr/local/cuda-9.0/lib64/libcudnn*
sudo ldconfig -v
至此,cuDNN的编译已经完全没有问题了。
终端输入:
nvidia-smi //确认显卡安装正常
nvcc -V //确认cudnn安装完成
//////////////ROS
http://wiki.ros.org/kinetic/Installation/Ubuntu
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 421C365BD9FF1F717815A3895523BAEEB01FA116
sudo apt-get update
sudo apt-get install ros-kinetic-desktop-full
sudo rosdep init
rosdep update
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
sudo apt-get install python-rosinstall python-rosinstall-generator python-wstool build-essential
sudo apt-get update
sudo apt-get install -y python-catkin-pkg python-rosdep python-wstool ros-$ROS_DISTRO-catkin libmosquitto-dev gksu
cd $HOME
git clone https://github.com/CPFL/Autoware.git --recurse-submodules
cd ~/Autoware/ros/src
catkin_init_workspace
cd ../
rosdep install -y --from-paths src --ignore-src --rosdistro $ROS_DISTRO
./catkin_make_release
echo "source /home/poa/Autoware/ros/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc
//-------------------------------------
//---ceres-solver-master
sudo apt-get install liblapack-dev
sudo apt-get install libsuitesparse-dev
sudo apt-get install libcxsparse3.1.4
sudo apt-get install libgflags-dev
sudo apt-get install libgoogle-glog-dev
sudo apt-get install libgtest-dev
cd ceres-solver-master
mkdir build
cd build
cmake ..
make -j32
sudo make install
//-------------------------------------
//---eigen-git-mirror-3.2.9
cd eigen-git-mirror-3.2.9
mkdir build
cd build
cmake ..
sudo make install
sudo apt install python-pip
pip install python_docx
cd protobuf-3.5.1
sudo apt-get install autoconf automake libtool curl make g++ unzip
./autogen.sh
./configure
sudo make -j32
sudo make check
sudo make install
sudo ldconfig
cd ~/setup/protobuf-3.5.1/src/google/protobuf/stubs
sudo cp strutil.h /usr/local/include/google/protobuf/stubs/
sudo cp stringprintf.h /usr/local/include/google/protobuf/stubs/
cd ~/setup
sudo dpkg -i wps-office_10.1.0.5672~a21_amd64.deb
sudo dpkg -i roboware-studio_1.2.0-1524709819_amd64.deb
cd linuxcan
sudo make
sudo make install
sudo modprobe pciefd
cd canlib/example
./listChannels
sudo apt install aptitude
tar -xvzf LBAS_CAPTURE_x86_64.tar.gz
cd LBAS_CAPTURE_x86_64
sudo ./setup.sh
cd /opt/LBAS/bin
./LBASPlayer
su
ufw disable
echo "source /home/poa/rplidar/ros/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc
cd $HOME/rplidar/ros
catkin_make --pkg road_msgs autoware_msgs dbw_mkz_msgs
catkin_make
打开终端,在终端中执行gnome-session-properties,会弹出一个“Startup Applications Preferences”的菜单,点击添加Add
Name:输入命令名称
Command:输入启动指令
Comment:输入指令描述
在Command里可以输入运行的脚本,如
gnome-terminal -x /home/poa/autoLoad.sh
开机启动can驱动
1 切换到root下
2 打开sudoers
gedit /etc/sudoers
3 添加免密码
poa ALL = NOPASSWD: ALL
程序中添加
system("sudo modprobe pciefd");
开机启动该程序即可
//--------------------
//--
问题:点击右上角 System Setting 无法弹出系统设置界面。
命令客户端 sudo apt-get install ubuntu-desktop
//---------------------