|
今天准备在机器上面部署一个Nessus的服务器端.然后就开始下载http://www.nessus.org/download 下载了源码准备自己编译安装,解压缩编译libnasl-2.2.5.tar.gz很正常. nessus-libraries-2.2.5.tar.gz也很正常.当解压编译到nessus-core-2.2.5.tar.gz的时候出现错误.
错误如下:
[root@redhatlinux nessus-core]# make
cd nessus && make
make[1]: Entering directory `/root/nessus-core/nessus'
gcc -g -O2 `sh ./cflags` -c auth.c
gcc -g -O2 `sh ./cflags` -c comm.c
gcc -g -O2 `sh ./cflags` -c sighand.c
gcc -g -O2 `sh ./cflags` -c xstuff.c
xstuff.c:32:21: gtk/gtk.h: 没有那个文件或目录
In file included from xstuff.c:35:
xstuff.h:24: parse error before '*' token
xstuff.h:25: parse error before '*' token
xstuff.h:26: parse error before '*' token
xstuff.h:26: parse error before '*' token
xstuff.h:26: warning: type defaults to `int' in declaration of `make_pixmap'
xstuff.h:26: warning: data definition has no type or storage class
xstuff.c: In function `init_display':
xstuff.c:41: warning: implicit declaration of function `gtk_init'
xstuff.c: At top level:
xstuff.c:45: parse error before '*' token
xstuff.c: In function `close_window':
xstuff.c:47: warning: implicit declaration of function `gtk_widget_hide'
xstuff.c:47: `w' undeclared (first use in this function)
xstuff.c:47: (Each undeclared identifier is reported only once
xstuff.c:47: for each function it appears in.)
xstuff.c: At top level:
xstuff.c:51: parse error before '*' token
xstuff.c: In function `close_display':
xstuff.c:57: warning: implicit declaration of function `gtk_main_quit'
xstuff.c: At top level:
xstuff.c:63: parse error before "GdkPixmap"
xstuff.c:63: warning: no semicolon at end of struct or union
xstuff.c:64: warning: type defaults to `int' in declaration of `mask'
xstuff.c:64: warning: data definition has no type or storage class
xstuff.c:65: parse error before '}' token
xstuff.c:68: parse error before "p"
xstuff.c: In function `pixmap_and_mask_destroy_notify':
xstuff.c:70: warning: implicit declaration of function `gdk_pixmap_unref'
xstuff.c:70: `p' undeclared (first use in this function)
xstuff.c:71: warning: implicit declaration of function `gdk_bitmap_unref'
xstuff.c:72: warning: implicit declaration of function `g_free'
xstuff.c: At top level:
xstuff.c:75: parse error before '*' token
xstuff.c:77: parse error before '*' token
xstuff.c:80: warning: return type defaults to `int'
xstuff.c: In function `make_pixmap':
xstuff.c:82: `gchar' undeclared (first use in this function)
xstuff.c:82: parse error before "name"
xstuff.c:83: `GdkColormap' undeclared (first use in this function)
xstuff.c:83: `colormap' undeclared (first use in this function)
xstuff.c:85: warning: implicit declaration of function `g_snprintf'
xstuff.c:85: `name' undeclared (first use in this function)
xstuff.c:85: `xpm_data' undeclared (first use in this function)
xstuff.c:86: warning: implicit declaration of function `gtk_object_get_data'
xstuff.c:86: warning: implicit declaration of function `GTK_OBJECT'
xstuff.c:86: `widget' undeclared (first use in this function)
xstuff.c:86: warning: assignment makes pointer from integer without a cast
xstuff.c:88: warning: implicit declaration of function `g_malloc'
xstuff.c:88: dereferencing pointer to incomplete type
xstuff.c:88: warning: assignment makes pointer from integer without a cast
xstuff.c:89: warning: implicit declaration of function `gtk_widget_get_colormap'xstuff.c:90: dereferencing pointer to incomplete type
xstuff.c:91: warning: implicit declaration of function `gdk_pixmap_colormap_create_from_xpm_d'
xstuff.c:92: dereferencing pointer to incomplete type
xstuff.c:92: `transparent' undeclared (first use in this function)
xstuff.c:92: parse error before ')' token
xstuff.c:94: warning: implicit declaration of function `gtk_object_set_data_full'
xstuff.c:96: warning: implicit declaration of function `gtk_pixmap_new'
xstuff.c:96: dereferencing pointer to incomplete type
xstuff.c:96: dereferencing pointer to incomplete type
xstuff.c:96: warning: return makes pointer from integer without a cast
make[1]: *** [xstuff.o] Error 1
make[1]: Leaving directory `/root/nessus-core/nessus'
make: *** [client] Error 2
[root@redhatlinux nessus-core]# ldconfig
[root@redhatlinux nessus-core]# vi /etc/ld.so.conf
[root@redhatlinux nessus-core]# make
cd nessus && make
make[1]: Entering directory `/root/nessus-core/nessus'
gcc -g -O2 `sh ./cflags` -c xstuff.c
xstuff.c:32:21: gtk/gtk.h: 没有那个文件或目录
In file included from xstuff.c:35:
xstuff.h:24: parse error before '*' token
xstuff.h:25: parse error before '*' token
xstuff.h:26: parse error before '*' token
xstuff.h:26: parse error before '*' token
xstuff.h:26: warning: type defaults to `int' in declaration of `make_pixmap'
xstuff.h:26: warning: data definition has no type or storage class
xstuff.c: In function `init_display':
xstuff.c:41: warning: implicit declaration of function `gtk_init'
xstuff.c: At top level:
xstuff.c:45: parse error before '*' token
xstuff.c: In function `close_window':
xstuff.c:47: warning: implicit declaration of function `gtk_widget_hide'
xstuff.c:47: `w' undeclared (first use in this function)
xstuff.c:47: (Each undeclared identifier is reported only once
xstuff.c:47: for each function it appears in.)
xstuff.c: At top level:
xstuff.c:51: parse error before '*' token
xstuff.c: In function `close_display':
xstuff.c:57: warning: implicit declaration of function `gtk_main_quit'
xstuff.c: At top level:
xstuff.c:63: parse error before "GdkPixmap"
xstuff.c:63: warning: no semicolon at end of struct or union
xstuff.c:64: warning: type defaults to `int' in declaration of `mask'
xstuff.c:64: warning: data definition has no type or storage class
xstuff.c:65: parse error before '}' token
xstuff.c:68: parse error before "p"
xstuff.c: In function `pixmap_and_mask_destroy_notify':
xstuff.c:70: warning: implicit declaration of function `gdk_pixmap_unref'
xstuff.c:70: `p' undeclared (first use in this function)
xstuff.c:71: warning: implicit declaration of function `gdk_bitmap_unref'
xstuff.c:72: warning: implicit declaration of function `g_free'
xstuff.c: At top level:
xstuff.c:75: parse error before '*' token
xstuff.c:77: parse error before '*' token
xstuff.c:80: warning: return type defaults to `int'
xstuff.c: In function `make_pixmap':
xstuff.c:82: `gchar' undeclared (first use in this function)
xstuff.c:82: parse error before "name"
xstuff.c:83: `GdkColormap' undeclared (first use in this function)
xstuff.c:83: `colormap' undeclared (first use in this function)
xstuff.c:85: warning: implicit declaration of function `g_snprintf'
xstuff.c:85: `name' undeclared (first use in this function)
xstuff.c:85: `xpm_data' undeclared (first use in this function)
xstuff.c:86: warning: implicit declaration of function `gtk_object_get_data'
xstuff.c:86: warning: implicit declaration of function `GTK_OBJECT'
xstuff.c:86: `widget' undeclared (first use in this function)
xstuff.c:86: warning: assignment makes pointer from integer without a cast
xstuff.c:88: warning: implicit declaration of function `g_malloc'
xstuff.c:88: dereferencing pointer to incomplete type
xstuff.c:88: warning: assignment makes pointer from integer without a cast
xstuff.c:89: warning: implicit declaration of function `gtk_widget_get_colormap'xstuff.c:90: dereferencing pointer to incomplete type
xstuff.c:91: warning: implicit declaration of function `gdk_pixmap_colormap_create_from_xpm_d'
xstuff.c:92: dereferencing pointer to incomplete type
xstuff.c:92: `transparent' undeclared (first use in this function)
xstuff.c:92: parse error before ')' token
xstuff.c:94: warning: implicit declaration of function `gtk_object_set_data_full'
xstuff.c:96: warning: implicit declaration of function `gtk_pixmap_new'
xstuff.c:96: dereferencing pointer to incomplete type
xstuff.c:96: dereferencing pointer to incomplete type
xstuff.c:96: warning: return makes pointer from integer without a cast
make[1]: *** [xstuff.o] Error 1
make[1]: Leaving directory `/root/nessus-core/nessus'
make: *** [client] Error 2
郁闷死了.这到底是怎么回事呢?
官方文档是这么说的:
This short page will explain you how to install Nessus on a Unix-like system,like Linux. This is pretty straightforward :Nessus compilation :To compile Nessus, you need to download the latest distributionavailable here. You should have thesefour files :
nessus-libraries-x.x.tar.gz
libnasl-x.x.tar.gz
nessus-core.x.x.tar.gz
nessus-plugins.x.x.tar.gz
You must compile them in this order.
Installing nessus-libraries
Compiling nessus-libraries is a simple operation :
cd nessus-libraries./configure make
make install
Installing libnasl
This is straightforward :
cd libnasl./configuremake
And as root, do :
make install
Repeat the same operation with nessus-core and nessus-plugins.
If you are using Linux, then make sure that /usr/local/lib is in /etc/ld.so.conf, and type ldconfig. Solaris users will have to execute :
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib (you may want to add this into your ~/.profile)
If you do not want the client to use GTK (if your system lacks X11 for instance), then you can compile a stripped-down version of the client which will work on command-line. To do this, add the --disable-gtk option to configure while building nessus-core :
cd nessus-core ./configure --disable-gtk make && make install
Then, that's it ! Nessus is installed on your system. See the demonstration for further informations about the use of Nessus
If something went wrong
Then have a look at the mailing list archives. If you still find no answer to your question, see the contacts section, or better yet, subscribe to the mailing list and ask your question.
我也照做了.咋就出现这种问题了呢?闹心,搜索了很多文章都没有在REDHAT下面实验过的.请教高手. |
|