Hi Guys,
I've been bashing away for days at this and could possibly use LS if
these two errors are fixable - and hopefully there aren't any other
serious errors. This is on a Debian squeeze server which was set up
from scratch - all installation notes are at the end of this email.
1. Error 1 - Printing to a PDF
When I print to PDF I get
Error!
Can't locate Template/Latex.pm in @INC (@INC contains: /etc/perl
/usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10
/usr/local/lib/site_perl .) at
/usr/local/share/perl/5.10.1/LedgerSMB/Template/LaTeX.pm line 58.
BEGIN failed--compilation aborted at
/usr/local/share/perl/5.10.1/LedgerSMB/Template/LaTeX.pm line 58.
Compilation failed in require at (eval 113) line 3.
I've tried
# cpan Template::Latex
and
# cpan Template::Plugin::Latex
but apart from producing tons of text they look like they failed. The
PDF would still not work - and if I ran the commands again they seemed
to start from scratch.
I've also installed
# apt-get install liblatex-driver-perl texlive-latex-extra
texlive-latex-extra-doc
But still get the same error.
2. Error 2 - Trying to send an email
Error!
*open |/usr/bin/sendmail -t: No such file or directory at
/usr/local/share/perl/5.10.1/LedgerSMB/Mailer.pm line 220.*
I've installed postfix which is generally a sendmail dropin replacement
- but would like to have a clean way of sorting this out.
Unless I can get these errors resolved quickly then we're going to have
to go back to SL.
Here's my notes so for for everything I've done on the Debian squeeze
server.
---++ Set up of ledgersmb
---+++ Get ledgersmb files
As this was to be installed as a website outside of the packaging system
a new user account called ledgersmb was created to hold the website files.
<verbatim>
$ cd ~
$ wget
http://downloads.sourceforge.net/project/ledger-smb/ledgersmb/1.3.23/ledgersmb-1.3.23.tar.gz
$ tar -xvzf ledgersmb-1.3.23.tar.gz
$ mv ledgersmb-1.3.23 web
</verbatim>
So, the files of ledgersmb are now in /home/ledgersmb/web
---+++ Install base packages
<verbatim>
# apt-get install apache2
# apt-get install postgresql postgresql-client postgresql-contrib
</verbatim>
NB - This is different from the LedgerSMB INSTALL file which says to
install postgresql-server.
---+++ Set up smbledger database admin user
<verbatim>
# su - postgres
postgres@whizzer2:~$ createuser -s -P lsadmin
Enter password for new role:
Enter it again:
postgres@whizzer2:~$</verbatim>
</verbatim>
The default set up of pg_hba.conf on Postgresql on Debian means that
accounts are already set to authenticate via md5.
---+++ Install extra packages required by LedgerSMB
Here we will install all perl packages that we can from Debian archive
so that we don't need to get many from cpan.
=apt-get install libdatetime-perl libdbi-perl libdbd-pg-perl
libcgi-simple-perl libtemplate-perl libconfig-std-perl libmime-lite-perl
liberror-perl liblocale-maketext-lexicon-perl libtest-exception-perl
libtest-trap-perl liblog-log4perl-perl libmath-bigint-gmp-perl
libfile-mimeinfo-perl=
We also need extra packages to be able to create PDF files.
=apt-get install texlive-latex-recommended=
NB - This will install quite a few packages.
Also installed the following packages to see if we could get printing to
PDF working.
=# apt-get install liblatex-driver-perl texlive-latex-extra
texlive-latex-extra-doc=
This package may also be needed so it is good to install it now.
=apt-get install libxml-twig-perl=
Now we need to use the built-in perl package checker and downloader.
Before running the command it is necessary to install the following
package to allow the 'perl Makefile.PL' command to work:
=apt-get install libmodule-install-perl=
We will also need to add the 'make' utility.
=apt-get install make=
Then - we will run LedgerSMB's own script to check all necessary perl
libriaries are available. As root cd into the base directory
(/home/ledgersmb/web) and then run:
=perl Makefile.PL=
Which gives output and at the end of the output we have:
<verbatim>
...
==> Auto-install the 1 mandatory module(s) from CPAN? [y]
[Size detection for images for embedding in LaTeX templates]
- Image::Size ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n] y
[POS module credit card processing support]
- Net::TCLink ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n] y
[Experimental scripting engine]
- Parse::RecDescent ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n]
[Developer tool dependencies]
- Getopt::Long ...loaded. (2.38)
- FileHandle ...loaded. (2.02)
- Locale::Country ...loaded. (2.07)
- Locale::Language ...loaded. (2.07)
[PDF and Postscript output]
- Template::Plugin::Latex ...missing. (would need 1)
==> Auto-install the 1 optional module(s) from CPAN? [n] y
[OpenOffice.org output]
- XML::Twig ...loaded. (3.34)
- OpenOffice::OODoc ...missing.
==> Auto-install the 1 optional module(s) from CPAN? [n] y
*** Dependencies will be installed the next time you type 'make'.
*** Module::AutoInstall configuration finished.
include inc/Module/Install/WriteAll.pm
include inc/Module/Install/Win32.pm
include inc/Module/Install/Can.pm
include inc/Module/Install/Fetch.pm
Warning: prerequisite IO::Scalar 0 not found.
Warning: prerequisite Image::Size 0 not found.
Warning: prerequisite Net::TCLink 0 not found.
Warning: prerequisite OpenOffice::OODoc 0 not found.
Warning: prerequisite Template::Plugin::Latex 1 not found.
Writing Makefile for LedgerSMB
Writing META.yml
root@whizzer2:/home/ledgersmb/web#</verbatim>
After this was run we ran:
=# make install=
Now - this is not in the INSTALL file - and we're guessing a bit here -
but we're going to copy ledgersmb.conf.default to ledgersmb.conf and
then edit the contrib_dir configuration to point to
/usr/share/postgresql/8.4/contrib as this is where it looks like the
contrib files are located.
---+++ Setting up Apache
Now we need to set up the Apache configuration. We have used a standard
Apache2 installation and if Apache ITK is used then the instructions may
need to be different.
=cp ledgersmb-httpd.conf.template /etc/apache2/conf.d/ledgersmb-httpd.conf=
Then edit this file and change WORKING_DIR to the base directory of the
ledgersmb files.
Also, if it is needed to access LS from other machines the lines about
allowing only from localhost/127.0.0.1 and changed to 'Allow from All'.
<verbatim>
# 17/10/2012 - kbailey
# Allow from 127.0.0.1
# Allow from localhost
Allow from All
</verbatim>
Need to enable the mod_rewrite module for Apache:
<verbatim>
# a2enmod rewrite
# apache2ctl restart
</verbatim>
---+++ Set up databases
It should be possible to access:
http://servername/ledgersmb/setup.pl
And login with the Postgresql user created previously and create new
databases etc.
---+++ Problems
When trying to create a PDF doc the error comes up as:
---++++ Error 1 - Printing to a PDF
When I print to PDF I get
Error!
Can't locate Template/Latex.pm in @INC (@INC contains: /etc/perl
/usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5
/usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10
/usr/local/lib/site_perl .) at
/usr/local/share/perl/5.10.1/LedgerSMB/Template/LaTeX.pm line 58.
BEGIN failed--compilation aborted at
/usr/local/share/perl/5.10.1/LedgerSMB/Template/LaTeX.pm line 58.
Compilation failed in require at (eval 113) line 3.
---++++ Error 2 - Trying to send an email
Error!
open |/usr/bin/sendmail -t: No such file or directory at
/usr/local/share/perl/5.10.1/LedgerSMB/Mailer.pm line 220.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Ledger-smb-users mailing list
Ledger-smb-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ledger-smb-users