./configure (Linux配置环境,生成Makefile)
make (编译链接,生成可执行文件或库)
make install (将生成的文件复制到对应的路径下)
而在configure阶段会产生各种各样的错误,大都是由于没有对应的类库而造成的。
错误信息:C compiler cannot create executables
错误信息:C++ preprocessor "/lib/cpp" fails sanity check
错误分析:以上两条信息都是由于C/C++编译组件没有安装完全导致的。在Ubuntu下有一个build-essential包,可以一次性将C/C++编译包安装完全。
sudo apt-get install build-essential
错误信息:Can't find X includes. Please check your installation and add the correct paths!
错误分析:没有X(图形界面)的包含文件。可以安装xlibs-dev解决此问题,也可以安装xorg-dev一次性安装所有的Xorg相关的包。
sudo apt-get install xlibs-dev
sudo apt-get install xorg-dev
错误信息:Qt (>= Qt 3.0) (headers and libraries) not found. Please check your installation!
sudo apt-get install libqt3-headers libqt3-mt-dev
错误信息:in the prefix, you've chosen, are no KDE headers installed. This will fail.So, check this please and use another prefix!
sudo apt-get install kdelibs4-dev kdelibs4c2a
错误信息:autoconf: not found
sudo apt-get install autoconf
错误信息: *** GTK >= 2.4.0 not installed! ***
sudo apt-get build-dep gedit
错误信息:Cannot find GTK: Is gtk-config in path?
sudo apt-get install libgtk1.2-dev
错误信息:No package 'gtk+-2.0' found
错误信息:No package 'gtksourceview-1.0' found
错误信息:No package 'libgnomeui-2.0' found
错误信息:No package 'libglade-2.0' found
错误信息:No package 'libgnomeprintui-2.2' found
sudo apt-get install libgtk2.0-dev libgtksourceview-dev libgnomeui-dev libglade2-dev libgnomeprint2.2-dev
错误信息:No package 'libpanelapplet-2.0' found
sudo apt-get install libpanelappletmm-2.6-dev
错误信息:You must have the GTK+ 2.0 development headers installed to compile ***.
sudo apt-get install libgtk2.0-dev
错误信息:You must have libxml2 >= 2.6.0 development headers installed to build.
sudo apt-get install libxml2-dev
错误信息:wxWidgets must be installed on your system but wx-config script couldn't be found. ...
sudo apt-get install libwxbase2.6-dev libwxgtk2.6-dev
错误信息: Header file pcap.h not found;
sudo apt-get install libpcap-dev
dengzb@dengzb-laptop:~$ wireshark
出现如下错误:wireshark: error while loading shared libraries: libwiretap.so.0: cannot open shared object file: No such file or directory
解决办法是:
export LD_LIBRARY_PATH=/usr/local/lib
可以在命令行执行,但是问题是每次登录都要执行一次,麻烦。那就把这条导入路径命令写入home目录下到.bashrc配置文件中,那每次启动就不用担心这些问题了