# Updating Apache - local file is longer than remote file



## soulreaver1 (Feb 27, 2012)

Hello,

After system and ports update I've a problem with installing Apache 2.2.22. It's on FreeBSD 8.2.


```
fetch: httpd-2.2.22.tar.bz2: local file (5774198 bytes) is longer than remote file (5378934 bytes)
=> Attempting to fetch ftp://ftp.sunet.se/pub/www/servers/apache/dist/httpd/httpd-2.2.22.tar.bz2
fetch: ftp://ftp.sunet.se/pub/www/servers/apache/dist/httpd/httpd-2.2.22.tar.bz2: Unknown FTP error
=> Attempting to fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/apache22/httpd-2.2.22.tar.bz2
fetch: httpd-2.2.22.tar.bz2: local file (5774198 bytes) is longer than remote file (5378934 bytes)
=> Couldn't fetch it - please try to retrieve this
=> port manually into /usr/ports/distfiles/apache22 and try again.
*** Error code 1

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

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

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


----------



## DutchDaemon (Feb 28, 2012)

The remote file has the right size, and that size is also in distinfo. If a [cmd=]portsnap fetch update[/cmd] doesn't help, try getting a new ports tree by issuing [cmd=]rm /var/db/portsnap/tag && portsnap fetch extract[/cmd]


----------



## wblock@ (Feb 28, 2012)

It's worth trying a make distclean and refetching before trying more drastic measures.


----------



## dave (Feb 28, 2012)

I run into this type of problem from time to time.  Nine times out of ten, I resolve it by simply copying and pasting the URL into my local browser to download, and then manually scp it into place in /usr/ports/distfiles or in this case /usr/ports/distfiles/apache22.  Then, start the build again.


----------



## soulreaver1 (Feb 28, 2012)

wblock@ said:
			
		

> It's worth trying a make distclean and refetching before trying more drastic measures.



Thanks, solved.


----------

