对于想了解ubuntuapt-getinstall-f错误:Can''texec"local...的读者,本文将是一篇不可错过的文章,我们将详细介绍ubuntuapt-getcommandnotfou
对于想了解ubuntu apt-get install -f 错误: Can''t exec "local...的读者,本文将是一篇不可错过的文章,我们将详细介绍ubuntu apt-get command not found,并且为您提供关于caffe ubuntu 14.04 install、Canonical 发布 Ubuntu Nexus 7 Desktop Installer、Install Caffe on Ubuntu 14、install nginx on ubuntu install ubuntu usb install ubuntu 14.04 ubuntu install jd的有价值信息。
本文目录一览:- ubuntu apt-get install -f 错误: Can''t exec "local...(ubuntu apt-get command not found)
- caffe ubuntu 14.04 install
- Canonical 发布 Ubuntu Nexus 7 Desktop Installer
- Install Caffe on Ubuntu 14
- install nginx on ubuntu install ubuntu usb install ubuntu 14.04 ubuntu install jd
ubuntu apt-get install -f 错误: Can''t exec "local...(ubuntu apt-get command not found)
Can''t exec "locale": No such file or directory at /usr/share/perl5/Debconf/Encoding.pm line 16.
Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp at /usr/share/perl5/Debconf/Encoding.pm line 17.
dpkg: `ldconfig'' not found on PATH.
dpkg: 1 expected program(s) not found on PATH.
NB: root''s PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin.
E: Sub-process /usr/bin/dpkg returned an error code (2)
mitja@cube:~$ printenv PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
解决办法:
由于报出缺少 "ldconfig"这个文件,所以可以:aptitude download libc-bin 下载libc-bin(ldconfig文件在这个里面)
然后dpkg -x libc-bin*.deb unpackdir/; cp unpackdir/sbin/ldconfig /sbin/;
最后sudo apt-get install -f;
就能够修复,然后就能够正常apt-get install
caffe ubuntu 14.04 install
http://www.linuxidc.com/Linux/2015-07/120449.htm
最近因为各种原因,装过不少次Caffe,安装过程很多坑,为节省新手的时间,特此总结整个安装流程。
关于Ubuntu 版本的选择,建议用14.04这个比较稳定的版本,但是千万不要用麒麟版!!!比原版体验要差很多!!!
Caffe的安装过程,基本采纳 这篇文章 然后稍作改动,跳过大坑。
Caffe + Ubuntu 14.04 64bit + CUDA 6.5 配置说明 http://www.linuxidc.com/Linux/2015-04/116444.htm
1. 安装开发依赖包
sudo apt-get install build-essential sudo apt-get install vim cmake git sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler
2. 安装CUDA
一般电脑都有双显卡:Intel 的集成显卡 + Nvidia 的独立显卡。要想两个显卡同时运行,需要关闭 lightdm 服务。
2.1 到 这里 下载安装包,选Linux x86 下的 Ubuntu 14.04, Local Package Installer,下载下来的文件为
cuda-repo-ubuntu1404-7-0-local_7.0-28_amd64.deb
2.2 在BIOS设置里选择用Intel显卡来显示或作为主要显示设备
2.3 进入Ubuntu, 按 ctrl+alt+F1 ,登入自己的账号,然后输入以下命令
sudo service lightdm stop
2.4 安装 CUDA,cd 到安装包目录,输入以下命令:
sudo dpkg -i cuda-repo-ubuntu1404-7-0-local_7.0-28_amd64.deb sudo apt-get update sudo apt-get install cuda
安装完后重启电脑。
3. 安装cuDNN
3.1 到这里注册下载,貌似注册验证要花一两天的样子,嫌麻烦的可以直接到Linux公社资源站下载
资源包下载地址:
------------------------------------------分割线------------------------------------------
FTP地址:ftp://ftp1.linuxidc.com
用户名:ftp1.linuxidc.com
密码:www.linuxidc.com
在 2015年LinuxIDC.com\7月\Caffe在Ubuntu 14.04 64bit 下的安装
下载方法见 http://www.linuxidc.com/Linux/2013-10/91140.htm
------------------------------------------分割线------------------------------------------
3.2 完后到下载目录,执行以下命令安装
tar -zxvf cudnn-6.5-linux-x64-v2.tgz cd cudnn-6.5-linux-x64-v2 sudo cp lib* /usr/local/cuda/lib64/ sudo cp cudnn.h /usr/local/cuda/include/
再更新下软连接
cd /usr/local/cuda/lib64/ sudo rm -rf libcudnn.so libcudnn.so.6.5 sudo ln -s libcudnn.so.6.5.48 libcudnn.so.6.5 sudo ln -s libcudnn.so.6.5 libcudnn.so
3.3 设置环境变量
gedit /etc/profile
在打开的文件尾部加上
PATH=/usr/local/cuda/bin:$PATH export PATH
保存后执行以下命令使之生效
source /etc/profile
同时创建以下文件
sudo vim /etc/ld.so.conf.d/cuda.conf
内容是
/usr/local/cuda/lib64
保存后,使之生效
sudo ldconfig
4. 安装CUDA Sample 及 ATLAS
4.1 Build sample
cd /usr/local/cuda/samples sudo make all -j8
我电脑是八核的,所以make 时候用-j8参数,大家根据情况更改,整个过程有点长,十分钟左右。
4.2 查看驱动是否安装成功
cd bin/x86_64/linux/release ./deviceQuery
出现以下信息则成功
./deviceQuery Starting... CUDA Device Query (Runtime API) version (CUDART static linking) Detected 1 CUDA Capable device(s) Device 0: "GeForce GTX 670" CUDA Driver Version / Runtime Version 6.5 / 6.5 CUDA Capability Major/Minor version number: 3.0 Total amount of global memory: 4095 MBytes (4294246400 bytes) ( 7) Multiprocessors, (192) CUDA Cores/MP: 1344 CUDA Cores GPU Clock rate: 1098 MHz (1.10 GHz) Memory Clock rate: 3105 Mhz Memory Bus Width: 256-bit L2 Cache Size: 524288 bytes Maximum Texture Dimension Size (x,y,z) 1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096) Maximum Layered 1D Texture Size, (num) layers 1D=(16384), 2048 layers Maximum Layered 2D Texture Size, (num) layers 2D=(16384, 16384), 2048 layers Total amount of constant memory: 65536 bytes Total amount of shared memory per block: 49152 bytes Total number of registers available per block: 65536 Warp size: 32 Maximum number of threads per multiprocessor: 2048 Maximum number of threads per block: 1024 Max dimension size of a thread block (x,y,z): (1024, 1024, 64) Max dimension size of a grid size (x,y,z): (2147483647, 65535, 65535) Maximum memory pitch: 2147483647 bytes Texture alignment: 512 bytes Concurrent copy and kernel execution: Yes with 1 copy engine(s) Run time limit on kernels: Yes Integrated GPU sharing Host Memory: No Support host page-locked memory mapping: Yes Alignment requirement for Surfaces: Yes Device has ECC support: Disabled Device supports Unified Addressing (UVA): Yes Device PCI Bus ID / PCI location ID: 1 / 0 Compute Mode: < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) > deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 6.5, CUDA Runtime Version = 6.5, NumDevs = 1, Device0 = GeForce GTX 670 Result = PASS
4.3 安装ATLAS
ATLAS是做线性代数运算的,还有俩可以选:一个是Intel 的 MKL,这个要收费,还有一个是OpenBLAS,这个比较麻烦;但是运行效率ATLAS < OpenBLAS < MKL
我就用ATLAS咯:
sudo apt-get install libatlas-base-dev
5. 安装Caffe需要的Python包
网上介绍用现有的anaconda,我反正不建议,因为路径设置麻烦,很容易出错,而且自己安装很简单也挺快的。
首先需要安装pip
sudo apt-get install python-pip
再下载caffe,我把caffe放在用户目录下
cd git clone https://github.com/BVLC/caffe.git
再转到caffe的python目录,安装scipy
cd caffe/python sudo apt-get install python-numpy python-scipy python-matplotlib ipython ipython-notebook python-pandas python-sympy python-nose
最后安装requirement里面的包,需要root权限
sudo su for req in $(cat requirements.txt); do pip install $req; done
如果提示报错,一般是缺少必须的包引起的,直接根据提示 pip install <package-name>就行了。
安装完后退出root权限
exit
6. 编译caffe
首先修改配置文件,回到caffe目录
cd ~/caffe cp Makefile.config.example Makefile.config gedit Makefile.config
这里仅需修改两处:
i) 使用cuDNN
# USE_CUDNN := 1
这里去掉#,取消注释为
USE_CUDNN := 1
ii) 修改python包目录,这句话
PYTHON_INCLUDE := /usr/include/python2.7 \ /usr/lib/python2.7/dist-packages/numpy/core/include
改为
PYTHON_INCLUDE := /usr/include/python2.7 \ /usr/local/lib/python2.7/dist-packages/numpy/core/include
因为新安装的python包目录在这里: /usr/local/lib/python2.7/dist-packages/
接下来就好办了,直接make
make all -j4 make test make runtest make pycaffe
这时候cd 到caffe 下的 python 目录,试试caffe 的 python wrapper安装好没有:
python import caffe
如果不报错,那就说明安装好了。
Canonical 发布 Ubuntu Nexus 7 Desktop Installer
Canonical的Victor Palau曾在YouTube上传过一段视频,演示了Nexus 7上运行Ubuntu的效果,从这则极短的视频中可以看出,Ubuntu在Nexus 7上的运行还是很流畅的。昨日,Canonical官方发布了一个小工具———Ubuntu Nexus 7 Desktop Installer,它可以帮助开发人员将Ubuntu 12.10轻松安装到Nexus 7上。
Ubuntu Nexus 7 Desktop Installer拥有图形化管理界面,简单易用,测试镜像下载和安装一键搞定。
上述教程8GB、16GB版N7均适用,部分已知问题点这里查看(刷机后的靓照如下)
友情提醒:刷机有风险,折腾需谨慎!
Install Caffe on Ubuntu 14
Assuming you have already installed CUDA and cudnn as well as anaconda
Install OpenCV
sudo apt-get update sudo apt-get install -y build-essential sudo apt-get install -y cmake sudo apt-get install -y libgtk2.0-dev sudo apt-get install -y pkg-config sudo apt-get install -y python-numpy python-dev sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev sudo apt-get install -y libjpeg-dev libpng-dev libtiff-dev libjasper-dev sudo apt-get -qq install libopencv-dev build-essential checkinstall cmake pkg-config yasm libjpeg-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev python-dev python-numpy libtbb-dev libqt4-dev libgtk2.0-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils wget http://downloads.sourceforge.net/project/opencvlibrary/opencv-unix/2.4.11/opencv-2.4.11.zip unzip opencv-2.4.11.zip cd opencv-2.4.11 mkdir release cd release cmake -G "Unix Makefiles" -D CMAKE_CXX_COMPILER=/usr/bin/g++ CMAKE_C_COMPILER=/usr/bin/gcc -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D BUILD_FAT_JAVA_LIB=ON -D INSTALL_TO_MANGLED_PATHS=ON -D INSTALL_CREATE_disTRIB=ON -D INSTALL_TESTS=ON -D ENABLE_FAST_MATH=ON -D WITH_IMAGEIO=ON -D BUILD_SHARED_LIBS=OFF -D WITH_GSTREAMER=ON -D CUDA_GENERATOR=Kepler .. make all -j8 sudo make install
After installation,run
sudo gedit /etc/ld.so.conf.d/opencv.conf
and add
/usr/local/lib
in the file and afterwards run
sudo ldconfig sudo gedit /etc/bash.bashrc
and add
PKG_CONfig_PATH=$PKG_CONfig_PATH:/usr/local/lib/pkgconfig export PKG_CONfig_PATH
Install ffmpeg(Optional)
sudo add-apt-repository ppa:mc3man/trusty-media sudo apt-get update sudo apt-get dist-upgrade sudo apt-get install ffmpeg
Install Caffe
Modify Makefile.config
## Refer to http://caffe.berkeleyvision.org/installation.html # Contributions simplifying and improving our build system are welcome! # cuDNN acceleration switch (uncomment to build with cuDNN). USE_CUDNN := 1 # cpu-only switch (uncomment to build without GPU support). # cpu_ONLY := 1 # uncomment to disable IO dependencies and corresponding data layers # USE_OPENCV := 0 # USE_LEVELDB := 0 # USE_LMDB := 0 # uncomment to allow MDB_NOLOCK when reading LMDB files (only if necessary) # You should not set this flag if you will be reading LMDBs with any # possibility of simultaneous read and write # ALLOW_LMDB_NOLOCK := 1 # Uncomment if you're using OpenCV 3 # OPENCV_VERSION := 3 # To customize your choice of compiler,uncomment and set the following. # N.B. the default for Linux is g++ and the default for OSX is clang++ # CUSTOM_CXX := g++ # CUDA directory contains bin/ and lib/ directories that we need. CUDA_DIR := /usr/local/cuda # On Ubuntu 14.04,if cuda tools are installed via # "sudo apt-get install nvidia-cuda-toolkit" then use this instead: # CUDA_DIR := /usr # CUDA architecture setting: going with all of them. # For CUDA < 6.0,comment the *_50 through *_61 lines for compatibility. # For CUDA < 8.0,comment the *_60 and *_61 lines for compatibility. CUDA_ARCH := -gencode arch=compute_20,code=sm_20 \ -gencode arch=compute_20,code=sm_21 \ -gencode arch=compute_30,code=sm_30 \ -gencode arch=compute_35,code=sm_35 \ -gencode arch=compute_50,code=sm_50 \ -gencode arch=compute_52,code=sm_52 \ -gencode arch=compute_60,code=sm_60 \ -gencode arch=compute_61,code=sm_61 \ -gencode arch=compute_61,code=compute_61 # BLAS choice: # atlas for ATLAS (default) # mkl for MKL # open for OpenBlas BLAS := atlas # Custom (MKL/ATLAS/OpenBLAS) include and lib directories. # Leave commented to accept the defaults for your choice of BLAS # (which should work)! # BLAS_INCLUDE := /path/to/your/blas # BLAS_LIB := /path/to/your/blas # Homebrew puts openblas in a directory that is not on the standard search path # BLAS_INCLUDE := $(shell brew --prefix openblas)/include # BLAS_LIB := $(shell brew --prefix openblas)/lib # This is required only if you will compile the matlab interface. # MATLAB directory should contain the mex binary in /bin. # MATLAB_DIR := /usr/local # MATLAB_DIR := /Applications/MATLAB_R2012b.app # NOTE: this is required only if you will compile the python interface. # We need to be able to find Python.h and numpy/arrayobject.h. # PYTHON_INCLUDE := /usr/include/python2.7 \ # /usr/lib/python2.7/dist-packages/numpy/core/include # Anaconda Python distribution is quite popular. Include path: # Verify anaconda location,sometimes it's in root. ANACONDA_HOME := $(HOME)/anaconda PYTHON_INCLUDE := $(ANACONDA_HOME)/include \ $(ANACONDA_HOME)/include/python2.7 \ $(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include # Uncomment to use Python 3 (default is Python 2) # PYTHON_LIBRARIES := boost_python3 python3.5m # PYTHON_INCLUDE := /usr/include/python3.5m \ # /usr/lib/python3.5/dist-packages/numpy/core/include # We need to be able to find libpythonX.X.so or .dylib. # PYTHON_LIB := /usr/lib PYTHON_LIB := $(ANACONDA_HOME)/lib # Homebrew installs numpy in a non standard path (keg only) # PYTHON_INCLUDE += $(dir $(shell python -c 'import numpy.core; print(numpy.core.__file__)'))/include # PYTHON_LIB += $(shell brew --prefix numpy)/lib # Uncomment to support layers written in Python (will link against Python libs) # WITH_PYTHON_LAYER := 1 # Whatever else you find you need goes here. INCLUDE_Dirs := $(PYTHON_INCLUDE) /usr/local/include LIBRARY_Dirs := $(PYTHON_LIB) /usr/local/lib /usr/lib # If Homebrew is installed at a non standard location (for example your home directory) and you use it for general dependencies # INCLUDE_Dirs += $(shell brew --prefix)/include # LIBRARY_Dirs += $(shell brew --prefix)/lib # Nccl acceleration switch (uncomment to build with Nccl) # https://github.com/NVIDIA/nccl (last tested version: v1.2.3-1+cuda8.0) # USE_Nccl := 1 # Uncomment to use `pkg-config` to specify OpenCV library paths. # (Usually not necessary -- OpenCV libraries are normally installed in one of the above $LIBRARY_Dirs.) USE_PKG_CONfig := 1 # N.B. both build and distribute dirs are cleared on `make clean` BUILD_DIR := build distribute_DIR := distribute # Uncomment for debugging. Does not work on OSX due to https://github.com/BVLC/caffe/issues/171 # DEBUG := 1 # The ID of the GPU that 'make runtest' will use to run unit tests. TEST_GPUID := 0 # enable pretty build (comment to see full commands) Q ?= @
and then run
make all -j8 make test -j8 make runtest make pycaffe
install nginx on ubuntu install ubuntu usb install ubuntu 14.04 ubuntu install jd
今天关于ubuntu apt-get install -f 错误: Can''t exec "local...和ubuntu apt-get command not found的讲解已经结束,谢谢您的阅读,如果想了解更多关于caffe ubuntu 14.04 install、Canonical 发布 Ubuntu Nexus 7 Desktop Installer、Install Caffe on Ubuntu 14、install nginx on ubuntu install ubuntu usb install ubuntu 14.04 ubuntu install jd的相关知识,请在本站搜索。
本文标签: