# Apache install error



## aadryaan94 (Oct 6, 2013)

When *I* try to install Apache on a 9.2 FreeBSD Sistem system, I have this error to help2man-1.43.3 - Native Language Support:

```
===>  License GPLv3 accepted by the user
===>  Found saved configuration for help2man-1.43.3
===> Fetching all distfiles required by help2man-1.43.3 for building
===>  Extracting for help2man-1.43.3
=> SHA256 Checksum OK for help2man-1.43.3.tar.gz.
===>  Patching for help2man-1.43.3
===>   help2man-1.43.3 depends on package: p5-Locale-gettext>=0 - not found
===>    Verifying install for p5-Locale-gettext>=0 in /usr/ports/devel/p5-Locale-gettext
===> Fetching all distfiles required by p5-Locale-gettext-1.05_3 for building
===>  Extracting for p5-Locale-gettext-1.05_3
=> SHA256 Checksum OK for gettext-1.05.tar.gz.
===>  Patching for p5-Locale-gettext-1.05_3
===>  Applying FreeBSD patches for p5-Locale-gettext-1.05_3
===>   p5-Locale-gettext-1.05_3 depends on file: /usr/local/bin/perl5.14.4 - found
===>   p5-Locale-gettext-1.05_3 depends on shared library: intl - found
===>  Configuring for p5-Locale-gettext-1.05_3
checking for gettext... no
checking for gettext in -L/usr/local/lib -lintl -I/usr/local/include... no
gettext function not found. Please install libintl at ./Makefile.PL line 18.
*** [do-configure] Error code 2

Stop in /usr/ports/devel/p5-Locale-gettext.
*** [build-depends] Error code 1

Stop in /usr/ports/misc/help2man.
*** [install] Error code 1

Stop in /usr/ports/misc/help2man.
*** [build-depends] Error code 1

Stop in /usr/ports/devel/autoconf.
*** [build-depends] Error code 1

Stop in /usr/ports/www/apache22.
*** [install] Error code 1

Stop in /usr/ports/www/apache22.
root@underworld:/usr/ports/www/apache22 #
```


----------



## aadryaan94 (Oct 6, 2013)

```
Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9.2-release/Latest/help2man.tbz: No route to host
pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9.2-release/Latest/help2man.tbz' by URL
```
I can't download anything from the server...  I don't know why... I can't update the ports tree (`portsnap fetch`)...


----------



## cpm@ (Oct 6, 2013)

```
checking for gettext... no
checking for gettext in -L/usr/local/lib -lintl -I/usr/local/include... no
gettext function not found. Please install libintl at ./Makefile.PL line 18.
*** [do-configure] Error code 2
```

It seems that the build of devel/p5-Locale-gettext fails because /usr/local/lib/libintl.so doesn't exist or /usr/local/include/libintl.h doesn't exist or isn't functioning properly. Try to reinstall devel/gettext.


----------



## cpm@ (Oct 7, 2013)

Use the following script to save the output of the ftp(1)() DIR command in a .txt file.

```
#!/usr/local/bin/bash

hostname="ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9.2-release/Latest/"
#username="ftpuser"
#password="ftppass"

ftp -in $hostname <<EOF

quote USER $username
quote PASS $password

dir . output.txt

quit
EOF
```

Run ftp-print-dir.sh as following:

```
[CMD]% ./ftp-print-dir.sh[/CMD] 
Trying 193.162.146.4:21 ...
Connected to ftp.freebsd.org.
220 beastie.tdk.net FTP server (Version 6.00LS) ready.
331 Guest login ok, send your email address as password.
230 Guest login ok, access restrictions apply.
Remote system type is UNIX.
Using binary mode to transfer files.
200 Type set to I.
250 CWD command successful.
250 CWD command successful.
250 CWD command successful.
250 CWD command successful.
250 CWD command successful.
250 CWD command successful.
500 USER: command not understood.
503 Login with USER first.
229 Entering Extended Passive Mode (|||54383|)
150 Opening ASCII mode data connection for '/bin/ls'.
  2119 KiB  196.16 KiB/s 
226 Transfer complete.
221 Goodbye.
```

After that, you can search whatever package easily and check it's availability, e.g. using grep(1)() command.

```
[CMD]% grep help2man output.txt[/CMD]
lrwxr-xr-x  1 1006  1006  26 Aug  5 08:29 help2man.tbz -> ../All/help2man-1.43.3.tbz
```


----------



## wblock@ (Oct 7, 2013)

aadryaan94 said:
			
		

> ```
> Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9.2-release/Latest/help2man.tbz: No route to host
> pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9.2-release/Latest/help2man.tbz' by URL
> ```



I just edited your message above.  It had about 40 spaces after the "r" in "release".  If that's just a cut-and-paste error, no problem.  It may be set in your system, which would explain why you can't install packages.


----------



## SirDice (Oct 8, 2013)

aadryaan94 said:
			
		

> ```
> Error: Unable to get ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9.2-release/Latest/help2man.tbz: No route to host
> pkg_add: unable to fetch 'ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-9.2-release/Latest/help2man.tbz' by URL
> ```
> I can't make any download from server. I don't know why. I can't make an update of ports (`portsnap fetch`).



"No route to host" usually means you don't have a working Internet connection.


----------



## aadryaan94 (Oct 8, 2013)

_The_ Internet connection _is_ working, I'm connected via PuTTY.


----------



## SirDice (Oct 8, 2013)

Sure, you may be able to get in. But can you get out again?


----------



## aadryaan94 (Oct 8, 2013)

I don't understand your question.


----------



## sk8harddiefast (Oct 9, 2013)

As far as I understood, @SirDice tried to explain to you that "No route to host" means that your computer cannot connect to the outside world. I don't know if it can connect using the SSH protocol in a local network but cannot connect to Internet. And how can it speak via security/putty when the network is not working right? Maybe it is possible. I don't know. Personally all the times I saw the message "No route to host" I never had a working Internet connection. And almost all the times I had forgotten to edit this file: /etc/resolv.conf.


----------



## aadryaan94 (Oct 9, 2013)

Ok. This is the problem. I will call the ISP tomorrow, and be right back with a reply.


----------



## sk8harddiefast (Oct 9, 2013)

If you don't see the file, create it. This is mine.

```
[ember@Unix /usr/home/ember]$ more /etc/resolv.conf 
nameserver 192.168.1.1
```


----------



## ShelLuser (Oct 9, 2013)

I think this could be more related to routing than connection problems. Just the other night was I talking on IRC to a friend of mine about FreeBSD and he was actually surprised that I had managed to upgrade my VPS from using 9.1 to 9.2, because they weren't even allowed to get direct access to the main repositories.

The only thing they did have access to was a local repository managed by the hosting provider itself, and everything else (including most svn servers) got re-routed to dev/null so to speak.

Going over this entire thread, especially the "_no route to host_" error, makes me wonder if you aren't facing something similar. Definitely a good idea to ask your ISP first.


----------



## aadryaan94 (Oct 9, 2013)

Network is working now, I make portsnap fetch, but don't work..


```
# cd /usr/ports/www/apache22 && make install clean
===>  Found saved configuration for apache22-2.2.25
===> Fetching all distfiles required by apache22-2.2.25 for building
===>  Extracting for apache22-2.2.25
=> SHA256 Checksum OK for apache22/httpd-2.2.25.tar.bz2.
===>  Patching for apache22-2.2.25
===>  Applying FreeBSD patches for apache22-2.2.25
===>   apache22-2.2.25 depends on file: /usr/local/bin/autoconf-2.69 - not found
===>    Verifying install for /usr/local/bin/autoconf-2.69 in /usr/ports/devel/a                                                                                                                     utoconf
===> Fetching all distfiles required by autoconf-2.69 for building
===>  Extracting for autoconf-2.69
=> SHA256 Checksum OK for autoconf-2.69.tar.xz.
===>  Patching for autoconf-2.69
===>  Applying FreeBSD patches for autoconf-2.69
===>   autoconf-2.69 depends on executable: gm4 - found
===>   autoconf-2.69 depends on executable: help2man - not found
===>    Verifying install for help2man in /usr/ports/misc/help2man
===>  License GPLv3 accepted by the user
===>  Found saved configuration for help2man-1.43.3
===> Fetching all distfiles required by help2man-1.43.3 for building
===>  Extracting for help2man-1.43.3
=> SHA256 Checksum OK for help2man-1.43.3.tar.gz.
===>  Patching for help2man-1.43.3
===>   help2man-1.43.3 depends on package: p5-Locale-gettext>=0 - not found
===>    Verifying install for p5-Locale-gettext>=0 in /usr/ports/devel/p5-Locale                                                                                                                     -gettext
===> Fetching all distfiles required by p5-Locale-gettext-1.05_3 for building
===>  Extracting for p5-Locale-gettext-1.05_3
=> SHA256 Checksum OK for gettext-1.05.tar.gz.
===>  Patching for p5-Locale-gettext-1.05_3
===>  Applying FreeBSD patches for p5-Locale-gettext-1.05_3
===>   p5-Locale-gettext-1.05_3 depends on file: /usr/local/bin/perl5.14.4 - fou                                                                                                                     nd
===>   p5-Locale-gettext-1.05_3 depends on shared library: intl - found
===>  Configuring for p5-Locale-gettext-1.05_3
checking for gettext... no
checking for gettext in -L/usr/local/lib -lintl -I/usr/local/include... no
gettext function not found. Please install libintl at ./Makefile.PL line 18.
*** [do-configure] Error code 2

Stop in /usr/ports/devel/p5-Locale-gettext.
*** [build-depends] Error code 1

Stop in /usr/ports/misc/help2man.
*** [install] Error code 1

Stop in /usr/ports/misc/help2man.
*** [build-depends] Error code 1

Stop in /usr/ports/devel/autoconf.
*** [build-depends] Error code 1

Stop in /usr/ports/www/apache22.
*** [install] Error code 1

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


----------



## wblock@ (Oct 9, 2013)

The solution was given in one of the other threads you started about this.  Use ports-mgmt/portmaster to reinstall devel/gettext.


----------



## aadryaan94 (Oct 9, 2013)

You can say me how to? I don't understand this manual..


----------



## cpm@ (Oct 9, 2013)

aadryaan94 said:
			
		

> You can say me how to? I don't understand this manual..



Run as root the following command:

```
# portmaster devel/gettext
```

Please, read portmaster(8)() man page for details.


----------



## aadryaan94 (Oct 10, 2013)

Done! But :


```
#cd /usr/ports/www/apache22 && make install clean
===>   apache22-2.2.25 depends on file: /usr/local/bin/autoconf-2.69 - found
===>   apache22-2.2.25 depends on package: libtool>=2.4 - found
===>   apache22-2.2.25 depends on file: /usr/local/bin/perl5.14.4 - found
===>   apache22-2.2.25 depends on shared library: libiconv.so.3 - found
===>   apache22-2.2.25 depends on shared library: expat - found
===>   apache22-2.2.25 depends on shared library: apr-1 - found
===>   apache22-2.2.25 depends on shared library: pcre - found
===>  Configuring for apache22-2.2.25

  You can check your modules configuration by using make show-modules

configure: loading site script /usr/ports/Templates/config.site
checking for chosen layout... FreeBSD
checking for working mkdir -p... yes
checking build system type... i386-portbld-freebsd9.2
checking host system type... i386-portbld-freebsd9.2
checking target system type... i386-portbld-freebsd9.2

Configuring Apache Portable Runtime library ...

checking for APR... configure: error: the --with-apr parameter is incorrect. It must specify an install prefix, a build directory, or an apr-config file.
===>  Script "configure" failed unexpectedly.
Please report the problem to apache@FreeBSD.org [maintainer] and attach the
"/usr/ports/www/apache22/work/httpd-2.2.25/config.log" including the output
of the failure of your make command. Also, it might be a good idea to provide
an overview of all packages installed on your system (e.g. a /usr/sbin/pkg_info
-Ea).
*** [do-configure] Error code 1

Stop in /usr/ports/www/apache22.
*** [install] Error code 1

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


----------



## wblock@ (Oct 10, 2013)

```
# cd /usr/ports/www/apache22
# make clean
# make
# make install clean
```


----------



## aadryaan94 (Oct 10, 2013)

Done! I make a reinstall of FreeBSD, and install Apache24. Now it's work!

For security, what is best ?


----------

