Installing JSDoc on Linux
As stated earlier is that JSDoc is a Perl application which can create an issue with windows. However in a Linux environment Perl is installed as part of the base installation. Normally any Redhat Package installation comes with Perl 5.8.5 and it will run JSDoc but to create the document web pages a certain module is needed to be compiled into the Perl installation. The HTML Template module is needed for JSDoc to generate the needed html files. In a Linux environment you can easily accomplish installing this module by entering the following command into a terminal command prompt.
# perl -MCPAN -e 'install HTML::Template'

Following this command will be the Perl installer prompting the user to answer certain questions as to where certain utility programs are located on the system. Typically these locations are default on Rehat/Fedora installations and most of the questions can be avoided by adding the parameter –fy to the command to forcefully say yes to all questions that default to yes. This will just speed up the install time for added convenience. All of this installation process must be executed under the root user of the system or the installation will not be compiled correctly. If you see an error that states the “make install has failed at line XXX.” Then you must migrate to the root user by typing the “su” and it will prompt you for the root password. Once in root you can re-execute the commands as previously done and the install should complete successfully.
To install JSdoc on a Linux system you would need to download the JSDoc source file to your system and uncompress it. Normally this file is in tar.gz format which can be uncompressed and provide the executable Perl script called jsdoc.pl. Once JSDoc is uncompressed you can test the source code with an available test program called test.js. This sample script will serve as a test to make sure that JSDoc is fully functionally. To find the output of JSDoc by default it outputs to a directory inside its directory called js_doc_out. Inside this directory you will see all the output html files from the running the test.js through the Perl script. Before generation you can specify certain output destinations by using the –d parameter along with the desired location.
Other install notes would be to follow the Perl installation and make sure when the installer prompts you for the locations of different dependencies if your unsure of the actually path to that program you can use this command “locate name_of_program” to find the path to that program and insert into the installer prompt. If you don’t have the specified program I would suggest opening another terminal and downloading and installing the needed dependency for it may cause problems with the documentation generation. Depending on your OS you can use yum or apt-get to find the source files.