• Welcome to The Network People Support Forums. Please login or sign up.
October 18, 2021, 07:35:02 PM

mysql problem

Started by nanook, May 11, 2006, 02:11:48 AM

Previous topic - Next topic

nanook

I'm trying to install Mail::Toaster 4.10 on a fresh Debian system.
I'm getting the following from the toaster_setup.pl -s pre command

./compile rules.c
./compile db.c
db.c:4:19: mysql.h: No such file or directory
db.c:18: error: syntax error before '*' token
db.c:18: warning: data definition has no type or storage class
db.c: In function `open_db':
db.c:32: error: `MYSQL' undeclared (first use in this function)
db.c:32: error: (Each undeclared identifier is reported only once
db.c:32: error: for each function it appears in.)
db.c:32: error: `tmp' undeclared (first use in this function)
db.c:38: error: syntax error before ')' token
db.c: In function `check_db':
db.c:60: error: `MYSQL_RES' undeclared (first use in this function)
db.c:60: error: `res' undeclared (first use in this function)
make: *** [db.o] Error 1
syscmd: make
syscmd: result: 512
install_from_source: make failed: No such file or directory
at /usr/local/share/perl/5.8.4/Mail/Toaster/Setup.pm line 5579
apollo:~# cd /usr/include/mysql/
apollo:/usr/include/mysql# ls
errmsg.h     my_dir.h         my_semaphore.h   my_sys.h       sslopt-longopts.h
keycache.h   my_getopt.h      mysql_com.h      my_xml.h       sslopt-vars.h
m_ctype.h    my_global.h      mysqld_error.h   ndb            typelib.h
m_string.h   my_list.h        mysql_embed.h    raid.h
my_alloc.h   my_net.h         mysql.h          sql_common.h
my_config.h  my_no_pthread.h  mysql_time.h     sql_state.h
my_dbug.h    my_pthread.h     mysql_version.h  sslopt-case.h
apollo:/usr/include/mysql# whereis mysql
mysql: /usr/bin/mysql /etc/mysql /usr/include/mysql /usr/share/mysql /usr/share/man/man1/mysql.1.gz

I've symlinked /usr/local/include/mysql to point to /usr/include/mysql but that didn't help
Symlinking msql.h creates other problems
I haven't been able to figure out where the script is looking for these files.

What do I need to do to make this work?


nanook

I got past this problem by installing mysql from package and editing one line in the Setup.pm file in the ucspi-tcp section to tell it where to look for the files.

Now I've got a new problem.
I'm getting an error installing maildrop saying it can't get the UID and GID for vchkpw.
The vchkpw account wasn't created.

What process creates the vchkpw account and when is it created?

I'd like to figure out how to get the scripst to install on debian with minimal intervention. I'll post the results when I'm done if interested.

nanook

I may have found the problem.

in the Setup.pm file I found this in the dependencies subroutine; (I added the line numbers

1065      if ($os eq "linux")
1066      {
1067         $utility->syscmd("groupadd qnofiles");
1068         $utility->syscmd("groupadd qmail");
1069         $utility->syscmd("groupadd -g 89 vchkpw");
1070         $utility->syscmd("groupadd -g 89 vchkpw");
1071         $utility->syscmd("useradd -g qnofiles -d /var/qmail/alias alias");
1072         $utility->syscmd("useradd -g qnofiles -d /var/qmail qmaild");
1073         $utility->syscmd("useradd -g qnofiles -d /var/qmail qmaill");
1074         $utility->syscmd("useradd -g qnofiles -d /var/qmail qmailp");
1075         $utility->syscmd("useradd -g qmail    -d /var/qmail qmailq");
1076         $utility->syscmd("useradd -g qmail    -d /var/qmail qmailr");
1077         $utility->syscmd("useradd -g qmail    -d /var/qmail qmails");
1078         $utility->syscmd("groupadd clamav");
1079         $utility->syscmd("useradd -g clamav clamav");
1080      }


Lines 1069 and 1070 are identical. I'm thinking this isn't correct.
Should one of them be adding the vpopmail user?

matt

yes, you are correct. Here is a replacement for that block of code:

        if ($os eq "linux")
        {
            my $qmaildir = $conf->{'qmail_dir'} || "/var/qmail";
            my $vpopdir  = $conf->{'vpopmail_home_dir'} || "/usr/local/vpopmail";

            $utility->syscmd("groupadd qnofiles");
            $utility->syscmd("groupadd qmail");
            $utility->syscmd("groupadd -g 89 vchkpw");
            $utility->syscmd("useradd -g vchkpw -d $vpopdir vpopmail");
            $utility->syscmd("useradd -g qnofiles -d $qmaildir/alias alias");
            $utility->syscmd("useradd -g qnofiles -d $qmaildir qmaild");
            $utility->syscmd("useradd -g qnofiles -d $qmaildir qmaill");
            $utility->syscmd("useradd -g qnofiles -d $qmaildir qmailp");
            $utility->syscmd("useradd -g qmail    -d $qmaildir qmailq");
            $utility->syscmd("useradd -g qmail    -d $qmaildir qmailr");
            $utility->syscmd("useradd -g qmail    -d $qmaildir qmails");
            $utility->syscmd("groupadd clamav");
            $utility->syscmd("useradd -g clamav clamav");
        }