An error occurred while installing Tomcat 6 under CentOSrelease5.5 of VMware Virtual Server.

Source: Internet
Author: User
An error occurred while installing Tomcat 6 under CentOSrelease5.5 of VMware Virtual -- Linux general technology-Linux technology and application information. The following is a detailed description. Dear friends.

The younger brother first came into contact with the Linux system. Today he planned to install Tomcat 6 but encountered an error, as detailed below.

1. Download The apache-tomcat-6.0.35.tar.gz on the official website
2. decompress the package to/opt/tomcat6.
3. Run the vi command to edit the/etc/profile file and add the following content to the end of the file:
Export JAVA_HOME =/opt/jdk1.6.0 _ 23
Export PATH = $ PATH: $ JAVA_HOME/bin: $ JAVA_HOME/jre/bin
Export CLASSPATH =.: $ JAVA_HOME/lib: # JAVA_HOME/jre/bin: $ CLASSPATH
Export PATH = $ PATH:/opt/tomcat6/bin/

4. Unzip/opt/tomcat6/bin/commons-daemon-native.tar.gz
5. Run/opt/tomcat6/bin/commons-daemon-1.0.7-native-src/unix/configure. The result is as follows:

[Root @ localhost unix] #./configure
* ** Current host ***
Checking build system type... i686-pc-linux-gnu
Checking host system type... i686-pc-linux-gnu
Checking cached host system type... OK
* ** C-Language compilation tools ***
Checking for gcc... gcc
Checking for C compiler default output file name... a. out
Checking whether the C compiler works... yes
Checking whether we are cross compiling... no
Checking for suffix of executables...
Checking for suffix of object files... o
Checking whether we are using the gnu c compiler... yes
Checking whether gcc accepts-g... yes
Checking for gcc option to accept ansi c... none needed
Checking for ranlib... ranlib
Checking for strip... strip
* ** Host support ***
Checking C flags dependant on host system type... OK
* ** Java compilation tools ***
Checking for sablevm... NONE
Checking for kaffe... NONE
Checking for javac.../usr/bin/javac
/Usr/bin/javac
Checking wether the Java compiler (/usr/bin/javac) works... yes
Checking for jar.../usr/bin/jar
Gcc flags added
Checking for cap_init in-lcap... yes
* ** Writing output files ***
Configure: creating./config. status
Config. status: creating Makefile
Config. status: creating Makedefs
Config. status: creating native/Makefile
* ** All done ***
Now you can issue "make"

6. Compile: The make result has an error. After make clean, make still has an error. The error is as follows.

[Root @ localhost unix] # make
(Cd native; make all)
Make [1]: Entering directory '/opt/tomcat6/bin/commons-daemon-1.0.7-native-src/unix/native'
Gcc-g-O2-DOS_LINUX-DDSO_DLFCN-DCPU = \ "i386 \"-Wall-Wstrict-prototypes-DHAVE_LIBCAP-I/etc/java/jdk1.6.0 _ 23/include-I/ etc/java/jdk1.6.0 _ 23/include/linux-c java. c-o java. o
Java. c: 24: 17: Error: jni. h: No file or directory
Java. c: 37: Error: expected '=', ';', 'asm 'or' _ attribute _ 'before' * 'token
Java. c: 38: Error: expected '=', ';', 'asm 'or' _ attribute _ 'before' * 'token
Java. c: 39: Error: expected '=', ';', 'asm 'or' _ attribute _ 'before 'cls'
Java. c: 44: Error: expected ') 'before' * 'token
Java. c: 53: Error: expected ') 'before' * 'token
Java. c: 106: Error: expected declaration specifiers or '... 'before' *' token
Java. c: 106: Error: expected ') 'before' * 'token
Java. c: In function 'java _ signal ':
Java. c: 110: Error: 'jmethodid' is not declared (used for the first time in this function)
Java. c: 110: Error: (even if a function appears multiple times, each undeclared identifier
Java. c: 110: Error: only one report is reported in the function .)
Java. c: 110: Error: expected '; 'before' method'
Java. c: 111: Error: 'jboolean' not declared (used for the first time in this function)
Java. c: 111: Error: expected '; 'before' ret'
Java. c: 117: Error: 'method' is not declared (used for the first time in this function)
Java. c: 117: Error: 'env' is not declared (used for the first time in this function)
Java. c: 117: Error: 'cls' is not declared (used for the first time in this function)
Java. c: 124: Error: 'ret 'is not declared (used for the first time in this function)
Java. c: In function 'java _ init ':
Java. c: 141: Error: 'jvm _ create_t 'is not declared (used for the first time in this function)
Java. c: 141: Error: expected '; 'before' symb'
Java. c: 142: Error: 'jninativemethod' is not declared (used for the first time in this function)
Java. c: 142: Error: expected '; 'before' nativemethods'
Java. c: 143: Error: 'javavmoption 'is not declared (used for the first time in this function)
Java. c: 143: Error: 'opt' not declared (used for the first time in this function)
Java. c: 145: Error: 'javavminitargs' is not declared (used for the first time in this function)
Java. c: 145: Error: expected '; 'before' arg'
Java. c: 147: Error: 'jint' is not declared (used for the first time in this function)
Java. c: 147: Error: expected '; 'before' ret'
Java. c: 217: Error: 'symb' is not declared (used for the first time in this function)
Java. c: 217: Error: expected '; 'before' dso _ symbol'
Java. c: 241: Error: 'arg 'is not declared (used for the first time in this function)
Java. c: 241: Error: 'jni _ VERSION_1_2 'is not declared (used for the first time in this function)
Java. c: 257: Error: expected expression before ') 'token
Java. c: 314: Error: 'ret 'is not declared (used for the first time in this function)
Java. c: 314: Error: 'jvm 'is not declared (used for the first time in this function)
Java. c: 314: Error: 'env' is not declared (used for the first time in this function)
Java. c: 323: Error: 'cls' is not declared (used for the first time in this function)
Java. c: 335: Error: 'nativemethods 'is not declared (used for the first time in this function)
Java. c: 338: Error: 'shutdown 'is not declared (used for the first time in this function)
Java. c: 343: Error: 'failed' not declared (used for the first time in this function)
Java. c: In function 'jvm _ destroy ':
Java. c: 358: Error: 'jclass' is not declared (used for the first time in this function)
Java. c: 358: Error: expected '; 'before 'system'
Java. c: 359: Error: 'jmethodid' is not declared (used for the first time in this function)
Java. c: 359: Error: expected '; 'before' method'
Java. c: 365: Error: 'env' is not declared (used for the first time in this function)
Java. c: 374: Error: 'method' is not declared (used for the first time in this function)
Java. c: 381: Error: 'jint' is not declared (used for the first time in this function)
Java. c: 381: Error: expected ') 'before' exit'
Java. c: 385: Error: 'jvm 'is not declared (used for the first time in this function)
Java. c: In function 'java _ load ':
Java. c: 394: Error: 'jclass' is not declared (used for the first time in this function)
Java. c: 394: Error: expected '; 'before' stringclass'
Java. c: 395: Error: 'jstring' is not declared (used for the first time in this function)
Java. c: 395: Error: expected '; 'before' classname'
Java. c: 396: Error: expected '; 'before' currentArgument'
Java. c: 397: Error: 'jobjectarray' is not declared (used for the first time in this function)
Java. c: 397: Error: expected '; 'before' stringArray'
Java. c: 398: Error: 'jmethodid' is not declared (used for the first time in this function)
Java. c: 398: Error: expected '; 'before' method'
Java. c: 399: Error: 'jboolean' not declared (used for the first time in this function)
Java. c: 399: Error: expected '; 'before' ret'
Java. c: 406: Error: 'classname' is not declared (used for the first time in this function)
Java. c: 406: Error: 'env' is not declared (used for the first time in this function)
Java. c: 414: Error: 'stringclass' is not declared (used for the first time in this function)
Java. c: 420: Error: 'stringarray' is not declared (used for the first time in this function)
Java. c: 428: Error: 'currentargument' not declared (used for the first time in this function)
Java. c: 439: Error: 'method' is not declared (used for the first time in this function)
Java. c: 439: Error: 'cls' is not declared (used for the first time in this function)
Java. c: 446: Error: 'ret 'is not declared (used for the first time in this function)
Java. c: In function 'java _ start ':
Java. c: 460: Error: 'jmethodid' is not declared (used for the first time in this function)
Java. c: 460: Error: expected '; 'before' method'
Java. c: 461: Error: 'jboolean' not declared (used for the first time in this function)
Java. c: 461: Error: expected '; 'before' ret'
Java. c: 467: Error: 'method' is not declared (used for the first time in this function)
Java. c: 467: Error: 'env' is not declared (used for the first time in this function)
Java. c: 467: Error: 'cls' is not declared (used for the first time in this function)
Java. c: 473: Error: 'ret 'is not declared (used for the first time in this function)
Java. c: In function 'java _ sleep ':
Java. c: 488: Error: 'jclass' is not declared (used for the first time in this function)
Java. c: 488: Error: expected '; 'before' clsthread'
Java. c: 489: Error: 'jmethodid' is not declared (used for the first time in this function)
Java. c: 489: Error: expected '; 'before' method'
Java. c: 498: Error: 'clsthread' is not declared (used for the first time in this function)
Java. c: 498: Error: 'env' is not declared (used for the first time in this function)
Java. c: 503: Error: 'method' is not declared (used for the first time in this function)
Java. c: 509: Error: 'jlong' is not declared (used for the first time in this function)
Java. c: 509: Error: expected ') 'before' wait'
Java. c: In function 'java _ stop ':
Java. c: 515: Error: 'jmethodid' is not declared (used for the first time in this function)
Java. c: 515: Error: expected '; 'before' method'
Java. c: 516: Error: 'jboolean' not declared (used for the first time in this function)
Java. c: 516: Error: expected '; 'before' ret'
Java. c: 522: Error: 'method' is not declared (used for the first time in this function)
Java. c: 522: Error: 'env' is not declared (used for the first time in this function)
Java. c: 522: Error: 'cls' is not declared (used for the first time in this function)
Java. c: 528: Error: 'ret 'is not declared (used for the first time in this function)
Java. c: In function 'java _ version ':
Java. c: 541: Error: 'jmethodid' is not declared (used for the first time in this function)
Java. c: 541: Error: expected '; 'before' method'
Java. c: 547: Error: 'method' is not declared (used for the first time in this function)
Java. c: 547: Error: 'env' is not declared (used for the first time in this function)
Java. c: 547: Error: 'cls' is not declared (used for the first time in this function)
Java. c: In function 'java _ check ':
Java. c: 560: Error: 'jstring' is not declared (used for the first time in this function)
Java. c: 560: Error: expected '; 'before' classname'
Java. c: 561: Error: 'jmethodid' is not declared (used for the first time in this function)
Java. c: 561: Error: expected '; 'before' method'
Java. c: 562: Error: 'jboolean' not declared (used for the first time in this function)
Java. c: 562: Error: expected '; 'before' ret'
Java. c: 569: Error: 'classname' is not declared (used for the first time in this function)
Java. c: 569: Error: 'env' is not declared (used for the first time in this function)
Java. c: 578: Error: 'method' is not declared (used for the first time in this function)
Java. c: 578: Error: 'cls' is not declared (used for the first time in this function)
Java. c: 584: Error: 'ret 'is not declared (used for the first time in this function)
Java. c: In function 'java _ destroy ':
Java. c: 597: Error: 'jmethodid' is not declared (used for the first time in this function)
Java. c: 597: Error: expected '; 'before' method'
Java. c: 598: Error: 'jboolean' not declared (used for the first time in this function)
Java. c: 598: Error: expected '; 'before' ret'
Java. c: 604: Error: 'method' is not declared (used for the first time in this function)
Java. c: 604: Error: 'env' is not declared (used for the first time in this function)
Java. c: 604: Error: 'cls' is not declared (used for the first time in this function)
Java. c: 610: Error: 'ret 'is not declared (used for the first time in this function)
Make [1]: *** [java. o] Error 1
Make [1]: Leaving directory '/opt/tomcat6/bin/commons-daemon-1.0.7-native-src/unix/native'
Make: *** [native/all] Error 2


Because I first came into contact with this system, I have not found a solution for searching the information on the Internet. Thank you very much for your guidance.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.