# [ZFSGuru] Apache 22 gives error building



## ikkeenjij36 (Dec 23, 2013)

Hi all. While I am trying to install Redmail all goes well until Apache 2.2 must be installed. I then get this error message back:


```
< INFO > Fetching all distfiles for port www/apache22 and dependencies
===> Fetching all distfiles for apache22-2.2.26 and dependencies
===>  apache22-2.2.26 AUTHN_DBD and DBD requires APR-util to have DBD support bu
ild in. Please rebuild APR at last with one DBD backend (MYSQL, PGSQL or SQLITE)
.
*** [fetch] Error code

Stop in /usr/ports/www/apache22.
*** [fetch-recursive] Error code 1

Stop in /usr/ports/www/apache22.
< ERROR >
Tarballs were not downloaded correctly, please fix it manually and then re-execute iRedMail.sh.
```

Is there anyone who can give me a solution so I can quickly restart my install? Would be much appreciated.


----------



## SirDice (Dec 24, 2013)

*Re: apache 22 gives error building*

Try reading the actual message.



			
				ikkeenjij36 said:
			
		

> ```
> ===>  apache22-2.2.26 AUTHN_DBD and DBD requires APR-util to have DBD support build in. Please rebuild APR at last with one DBD backend (MYSQL, PGSQL or SQLITE).
> ```


Don't turn on random options because they look cool. Turn on options when you know and understand what they do and what they require.


----------



## ikkeenjij36 (Dec 24, 2013)

*Re: apache 22 gives error building*



			
				SirDice said:
			
		

> Try reading the actual message.
> 
> 
> 
> ...


Bit of  a strange answer,not helping me,just tried to install redmail on it not try to turn something on cause it looks cool.
Still waiting more responses.


----------



## ljboiler (Dec 24, 2013)

*Re: Apache 22 gives error building*

The error message is saying that you must rebuild the devel/apr1 port and make sure that you have one of those listed options (MYSQL, PGSQL, or SQLITE) selected.  Run `make config` in the devel/apr1 directory to see what options are currently turned on and and select one of those database support options, then `make reinstall clean` to rebuild it.


----------



## ikkeenjij36 (Dec 24, 2013)

*Re: Apache 22 gives error building*

Is it like I presume `cd /usr/ports/devel1/apr1` and then `make reinstall clean`?


----------



## ljboiler (Dec 24, 2013)

*Re: Apache 22 gives error building*


```
cd /usr/ports/devel/apr1
make config
make reinstall clean
```


----------



## ikkeenjij36 (Dec 24, 2013)

Yes, after *I* did that *I* get the error 
	
	



```
mysql51-client is installed mysql55 is needed
```
How do *I* delete mysql51-client?


----------



## ikkeenjij36 (Dec 24, 2013)

ikkeenjij36 said:
			
		

> Yes, after *I* did that *I* get the error
> 
> 
> 
> ...


Found out how to but when i give in this: `cd /usr/ports/databases/mysql51-client` *I* get  error 
	
	



```
no such file or directory
```
 but when *I* go to databases and give `ls` *I* can see mysql51 server etc. But also mysql55 and 56.

Oh and when *I* gave `make config` mysql was selected.


----------



## ljboiler (Dec 24, 2013)

```
jimmy@jmobile:/usr/ports/databases % ls -d mysql*
mysql++1                mysql-workbench51       mysql56-server
mysql++3                mysql-workbench52       mysqlard
mysql-connector-c       mysql-xql               mysqlbackup
mysql-connector-c++     mysql2odbc              mysqlcppapi
mysql-connector-java    mysql2pgsql             mysqldumper
mysql-connector-odbc    mysql51-client          mysqlidxchk
mysql-proxy             mysql51-scripts         mysqlreport
mysql-q4m               mysql51-server          mysqlsla
mysql-udf               mysql55-client          mysqlsniffer
mysql-udf-preg          mysql55-server          mysqltcl
mysql-udf-sys           mysql56-client          mysqltuner
```

There should be a mysql51-client directory there.  Update your ports tree.


----------



## ikkeenjij36 (Dec 24, 2013)

*D*id a*n* update of the ports[ ]tree and it says it's up to date. I get this error every single time:


```
===>  apr-1.4.8.1.5.3 cannot install: MySQL versions mismatch: mysql51-client is
 installed and wanted version is mysql55-client.
```

Looks like it disappeared somehow?


----------



## ohauer (Dec 25, 2013)

MySQL 5.1 is near to EOL and the default MySQL version is 5.5 which is the version that will be installed and used until you overwrite the default MySQL version in /e*t*c/make.conf.

This should solve your issue with the MySQL version

```
cat /etc/make.conf
# I'm aware this MySQL 5.1 is near EOL but don't want to upgrade ...
# I also will not blame Maintainers ...
DEFAULT_MYSQL_VER?=5.1
```


----------



## ikkeenjij36 (Dec 25, 2013)

Thx but with what command can i overwrite then?
Searched google but couldnt find it


----------



## ikkeenjij36 (Dec 25, 2013)

*F*ound it. This is the output of `cat /etc/make.conf`:


```
## make configuration for kernel, world and ports
#

# with PKGNG (required)
WITH_PKGNG=yes

# disable CUPS printing service
WITHOUT_CUPS=yes

# enable Intel KMS support and new X.org
# WARNING: enabling KMS only works on recent Intel GPUs i.e. SandyBridge
#WITH_KMS=yes
#WITH_NEW_XORG=yes

# disable CPU extensions like SSE/SSSE
#NO_CPU_CFLAGS=yes
#NO_CPU_COPTFLAGS=yes

# iRedMail-WITHOUT_X11
WITHOUT_X11=yes
# iRedMail-WANT_OPENLDAP_VER
WANT_OPENLDAP_VER=24
# iRedMail-WANT_MYSQL_VER
WANT_MYSQL_VER=55
# iRedMail-WANT_PGSQL_VER
WANT_PGSQL_VER=91
# iRedMail-DEFAULT_VERSIONS
DEFAULT_VERSIONS=python=2.7 python2=2.7
# iRedMail-APACHE_PORT
APACHE_PORT=www/apache22
# iRedMail-WITH_SASL
WITH_SASL=yes
# iRedMail-WANT_BDB_VER
WANT_BDB_VER=48
# added by use.perl 2013-12-23 19:02:54
PERL_VERSION=5.14.4
```


----------



## ohauer (Dec 25, 2013)

```
# iRedMail-WANT_MYSQL_VER
WANT_MYSQL_VER=55
```
So first update your MySQL to 5.5 before building ports depending on MySQL ...


----------



## ikkeenjij36 (Dec 25, 2013)

ohauer said:
			
		

> ```
> # iRedMail-WANT_MYSQL_VER
> WANT_MYSQL_VER=55
> ```
> So first update your MySQL to 5.5 before building ports depending on MySQL ...


Allright i understand but it won't upgrade to 5.5.
If i give a portsnap update it says portstree up to date.
How can i overwrite mysql51?


----------



## ohauer (Dec 25, 2013)

If you don't want to upgrade remove this line from your /etc/make.conf

```
WANT_MYSQL_VER=55
```


In case you don't know what the the line does read /usr/ports/Mk/bsd.database.mk.


----------



## ikkeenjij36 (Dec 25, 2013)

If *I* give command `# cd /urs/ports/databases/mysql51`

```
su: cd: /urs/ports/databases/mysql51: No such file or directory
```
How am *I* to see this?


----------



## ohauer (Dec 25, 2013)

ikkeenjij36 said:
			
		

> If i give command [root@zfsguru ~]# cd /urs/ports/databases/mysql51
> su: cd: /urs/ports/databases/mysql51: No such file or directory
> How am i to see this?



There is no such directory! However you can find /usr/ports/databases/mysql51-server and /usr/ports/databases/mysql51-client.

*Y*ou can get a quick overview with the command `grep mysql5 /usr/ports/databases/Makefile`.


----------



## ikkeenjij36 (Dec 25, 2013)

`grep mysql5 /usr/ports/databases/Makefile`

```
SUBDIR += mysql51-client
    SUBDIR += mysql51-scripts
    SUBDIR += mysql51-server
    SUBDIR += mysql55-client
    SUBDIR += mysql55-server
    SUBDIR += mysql56-client
    SUBDIR += mysql56-server
    SUBDIR += p5-DBD-mysql51
    SUBDIR += p5-DBD-mysql52
    SUBDIR += p5-DBD-mysql55
```
This is the output of that  last command. How do *I* go further from here?


----------



## ikkeenjij36 (Dec 25, 2013)

Well *I* am getting a bit further but now i get this error report? Please help?

```
apache22-2.2.26 LDAP and AUTHNZ_LDAP requires APR-util to have LDAP support built in. Please rebuild APR with LDAP support.
*** [install] Error code 1

Stop in /usr/ports/www/apache22.
```


----------



## ohauer (Dec 25, 2013)

Hm you know what a SUBDIR is? 
It is a directory where you can change to and then go on ...

I suggest reading the FreeBSD online manual and http://www.catb.org/~esr/faqs/smart-questions.html

<starring at my monitor and asking me: noob or Troll ???>


----------



## ikkeenjij36 (Dec 25, 2013)

Well, *I* give up,after two days of trying to solve this *I* will do without a mailserver or anything else, thanks for the ones who tried to help me but it's getting me to*o* much trouble with this. Will wait till until someone can give me a straight and direct help.


----------



## wblock@ (Dec 25, 2013)

It's probably because of your broken keyboard.


----------



## ikkeenjij36 (Dec 25, 2013)

If you have a solution?


----------



## wblock@ (Dec 25, 2013)

Replace the keyboard so you can type upper and lower case and [ and ] characters.  Then you'll be able to format your posts here, too.


----------



## DutchDaemon (Dec 25, 2013)

I have a headache just reading this unformatted stuff. If you want to write more posts here, follow the forum rules and guidelines. I'm not spending Christmas rewriting each and every one of your posts. And if you want to hang around demanding help, FreeBSD is not for you.


----------



## ikkeenjij36 (Dec 26, 2013)

Well I finally got the issue about MySQL resolved by `rm - /var/db/mysql`. But now when *I* want  to install apache22 *I* get this error after `cd usr/ports/www/apche22` and `make install clean`:


```
Installing apache22-2.2.26...pkg-static: apache22-2.2.26 conflicts with apache24-2.4.6_1 (installs files into the same place).  Problematic file: /usr/local/man/man1/dbmmanage.1.gz
```
.

How should *I* resolve this issue now?


----------

