# Error from bsd.apache.mk.



## BSDi (May 27, 2014)

Hi,

I use FreeBSD 10.0-RELEASE-p1, I installed all services (Apache, PHP, MySQL) with ports successfully. I made upgrade port with portmaster, I check before /usr/ports/UPDATING. All recompilation was ok. When I upgrade Apache, I see this error:

```
===>  ap22-mod_myvhost-0.21 : Error from bsd.apache.mk. specify only one of: USE_APACHE USE_APACHE_BUILD USE_APACHE_RUN.
*** Error code 1
```

I had checked the Makefile in /usr/ports/www/mod_myvhost/Makefile, I see

```
USE_APACHE=     22+
```

I read Apache documentation at https://wiki.freebsd.org/bsd.apache.mk, but the error still exists. I checked in the FreeBSD Forum if the error had been solved, so I need some help. This error seems to come from the latest ports tree.

Thanks.


----------



## SirDice (May 27, 2014)

What's in your /etc/make.conf? And what version of Apache did you install?


----------



## BSDi (May 27, 2014)

/etc/make.conf:


```
WITH_PKGNG=yes
devel_apr_SET= MYSQL
www_apache22_SET=DBD SUEXEC
www_apache22_SET=SUEXEC
mail_postfix_SET= MYSQL TLS DOVECOT2 SPF SASL2
mail_dovecot2_SET= MYSQL SSL
ftp_pure-ftpd_SET= MYSQL PERUSERLIMITS THROTTLING
lang_php5_SET= APACHE
lang_php5-extensions_SET= BCMATH BZ2 CALENDAR CURL DOM EXIF FILEINFO FTP GD GETTEXT IMAP MBSTRING MCRYPT MYSQL MYSQLI SOAP SOCKETS SQLITE XSL ZIP ZLIB OPENSS
lang_php52_SET= APACHE
lang_php52-extensions_SET= BCMATH BZ2 CALENDAR CURL DOM EXIF FILEINFO FTP GD GETTEXT IMAP MBSTRING MCRYPT MYSQL MYSQLI SOAP SOCKETS SQLITE XSL ZIP ZLIB OPENSS
lang_php53_SET= APACHE
lang_php53-extensions_SET= BCMATH BZ2 CALENDAR CURL DOM EXIF FILEINFO FTP GD GETTEXT IMAP MBSTRING MCRYPT MYSQL MYSQLI SOAP SOCKETS SQLITE XSL ZIP ZLIB OPENSS
mail_sqlgrey_SET=MYSQL
```

*I* try to add in /etc/make.conf:

```
APACHE_PORT= www/apache22
```

but there is still an error when *I* rebuild the port.


```
root@xxx:/usr/ports/www/mod_myvhost # make install clean
===>  ap22-mod_myvhost-0.21 : Error from bsd.apache.mk. specify only one of: USE_APACHE USE_APACHE_BUILD USE_APACHE_RUN.
*** Error code 1

Stop.
make: stopped in /usr/ports/www/mod_myvhost
```


----------



## SirDice (May 27, 2014)

I suggest removing everything from /etc/make.conf.


----------



## BSDi (May 27, 2014)

i try this:


```
cp -a make.conf make.conf_SAVE
echo '' > make.conf
```


```
root@xxx:/usr/ports/www/mod_myvhost # make clean
===>  Cleaning for ap22-mod_myvhost-0.21
```


```
root@:/usr/ports/www/mod_myvhost # make install clean
===>  ap22-mod_myvhost-0.21 : Error from bsd.apache.mk. specify only one of: USE_APACHE USE_APACHE_BUILD USE_APACHE_RUN.
*** Error code 1

Stop.
```

but error still


----------



## BSDi (May 27, 2014)

*[SOLVED]:Re: Error from bsd.apache.mk.*

it's not a good practice, but I comment in /usr/ports/www/mod_myvhost/Makefile


```
#USE_APACHE=    22+
```

in the Makefile and now it is ok for compilation.


----------



## talsamon (May 27, 2014)

sudo make config --> uncheck PHP_MODULE


----------



## SirDice (May 28, 2014)

Please submit a PR so the port can be fixed.


----------

