Contact Linux often feel Linux software installation is very confusing, do not know where he installed, he has been very hesitant, and now I write their own experience, for you to provide reference.
Linux/C + + language open source software often uses makefile management, it needs configure, make, install 3 steps to install the software. After the xxx.tar.gz source pack decompression can be in the folder for these 3 steps.
./configure--prefix=/path-to-install
This is a critical step in determining where the software's Lib bin include, and so on, will be installed, and, if not specified, by default installed in the/usr/local/bin,/usr/local/lib,/usr/local/include location. When you install a lot of software, the contents of these directories become particularly miscellaneous, often do not know what the file belongs to which software.
Make
After make the C + + file is compiled into an. o file, which is called the target file
Make install
Link the target file into an executable binary file, put it in the bin, package it into LIB, and place the header file in the include. If the prefix specified path is in the directory of root permissions, you will also need to use the
sudo make install
To execute. At this point, the source package will not work, but you can save the next time you compile, or later execute the make uninstall command to remove the extended file.
/usr/local/bin,/usr/local/lib,/usr/local/include Clamp is in the system of Path,ld_library_path,c_include_path,cplus_include_ The PATH environment variable, without editing the extra configuration.
However, in order to manage our own software more methodically, we tend to place the software in our own designated directory. At this point we need to configure the environment variables.
bin Lib include settings
Export path= $PATH:/home/solo/tools/zeromq/bin
export ld_library_path= $LD _library_path:/home/solo/tools/ Zeromq/lib
export c_include_path= $C _include_path:/home/solo/tools/zeromq/include
export Cplus_include_ Path= $CPLUS _include_path:/home/solo/tools/zeromq/include
Shared Library Management
1/etc/ld.so.conf default admin/lib and/usr/lib, call ldconfig command update
2 Other path Lib can join/etc/ld.so.conf, call ldconfig command update
3 through Ld_library_path Author Introduction
Tang Riche , a graduate student of the State Key Laboratory (PDL) for parallel and distributed computing at National Defense Science and Technology University, began contacting spark in 14, preparing to contribute their own code to the spark-related open source community for the remainder of the study period, and is prepared to continue doing so after graduation.
Email: tanglizhe1105@qq.com