# Errors when installing ports



## Flantec (Jan 5, 2014)

I am getting Error code 2 and Error code 1 when installing ports on a new server. *T*his has happened on several of the ports that *I* have tried to install. *T*he issue appears to be a resulting 
	
	



```
no such file or directory
```
 but *I* am unable to deduce where the exact issue is.  

*T*his is on freebsd FreeBSD 9.2, fully updated. *B*elow is the partial output when the failures begin for installing the port ImageMagick. Thank you very much in advance.  

```
===>  Building for jbigkit-1.6
(cd libjbig;  /usr/bin/make "CC=cc" "CFLAGS=-O2 -pipe -fno-strict-aliasing  -I../libjbig")
cd: libjbig: No such file or directory
*** [lib] Error code 2
1 error
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** [do-build] Error code 1

Stop in /usr/ports/graphics/jbigkit.
*** [lib-depends] Error code 1

Stop in /usr/ports/graphics/tiff.
*** [install] Error code 1

Stop in /usr/ports/graphics/tiff.
*** [lib-depends] Error code 1

Stop in /usr/ports/print/ghostscript9-nox11.
*** [install] Error code 1

Stop in /usr/ports/print/ghostscript9-nox11.
*** [build-depends] Error code 1

Stop in /usr/ports/graphics/ImageMagick-nox11.
*** [install] Error code 1

Stop in /usr/ports/graphics/ImageMagick-nox11.
```


----------



## trh411 (Jan 5, 2014)

Try updating your ports tree:

```
portsnap fetch update
```
And see if that helps.


----------



## Flantec (Jan 5, 2014)

I have updated the ports tree and that did not help.  thanks,


----------



## Anonymous (Jan 5, 2014)

I tried it - it works with all compilers, but doesn't work with 
	
	



```
CFLAGS="-fno-strict-aliasing"
```


----------



## Flantec (Jan 5, 2014)

I certainly did not set that, and I am not even sure WHERE *I* would set that.  *T*hat last port that *I* was able to install successfully was php5.  *I*s there any reason to believe that that port would have changed that value?


----------



## Flantec (Jan 5, 2014)

Here is another failed install output for Curl, in the event that it reveals more information:

```
[root@filepro curl]# make install clean
===>  Staging for curl-7.33.0_2
===>   curl-7.33.0_2 depends on file: /usr/local/share/certs/ca-root-nss.crt - found
===>   Generating temporary packing list
Making install in lib
 /bin/mkdir -p '/usr/ports/ftp/curl/work/stage/usr/local/lib'
 /bin/sh ../libtool   --mode=install /usr/bin/install -c -o root -g wheel -s  libcurl.la '/usr/ports/ftp/curl/work/stage/usr/local/lib'
libtool: install: /usr/bin/install -c -o root -g wheel .libs/libcurl.so.7 /usr/ports/ftp/curl/work/stage/usr/local/lib/libcurl.so.7
libtool: install: strip --strip-unneeded /usr/ports/ftp/curl/work/stage/usr/local/lib/libcurl.so.7
libtool: install: (cd /usr/ports/ftp/curl/work/stage/usr/local/lib && { ln -s -f libcurl.so.7 libcurl.so || { rm -f libcurl.so && ln -s libcurl.so.7 libcurl.so; }; })
libtool: install: (cd /usr/ports/ftp/curl/work/stage/usr/local/lib && { ln -s -f libcurl.so.7 libcurl.so || { rm -f libcurl.so && ln -s libcurl.so.7 libcurl.so; }; })
libtool: install: /usr/bin/install -c -o root -g wheel .libs/libcurl.lai /usr/ports/ftp/curl/work/stage/usr/local/lib/libcurl.la
libtool: install: /usr/bin/install -c -o root -g wheel .libs/libcurl.a /usr/ports/ftp/curl/work/stage/usr/local/lib/libcurl.a
libtool: install: strip --strip-debug /usr/ports/ftp/curl/work/stage/usr/local/lib/libcurl.a
libtool: install: chmod 644 /usr/ports/ftp/curl/work/stage/usr/local/lib/libcurl.a
libtool: install: ranlib /usr/ports/ftp/curl/work/stage/usr/local/lib/libcurl.a
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
ranlib: warning: can't find .strtab section
libtool: install: warning: remember to run `libtool --finish /usr/local/lib'
Making install in src
/usr/bin/make  install-am
 /bin/mkdir -p '/usr/ports/ftp/curl/work/stage/usr/local/bin'
  /bin/sh ../libtool   --mode=install install  -s -o root -g wheel -m 555 curl '/usr/ports/ftp/curl/work/stage/usr/local/bin'
libtool: install: install -o root -g wheel -m 555 -s .libs/curl /usr/ports/ftp/curl/work/stage/usr/local/bin/curl
Making install in include
Making install in curl
 /bin/mkdir -p '/usr/ports/ftp/curl/work/stage/usr/local/include/curl'
 install  -o root -g wheel -m 444 curl.h curlver.h easy.h mprintf.h stdcheaders.h multi.h typecheck-gcc.h curlbuild.h curlrules.h '/usr/ports/ftp/curl/work/stage/usr/local/include/curl'
Making install in docs
Making install in examples
Making install in libcurl
 /bin/mkdir -p '/usr/ports/ftp/curl/work/stage/usr/local/man/man3'
 install  -o root -g wheel -m 444 curl_easy_cleanup.3 curl_easy_getinfo.3 curl_easy_init.3 curl_easy_perform.3 curl_easy_setopt.3 curl_easy_duphandle.3 curl_formadd.3 curl_formfree.3 curl_getdate.3 curl_getenv.3 curl_slist_append.3 curl_slist_free_all.3 curl_version.3 curl_version_info.3 curl_escape.3 curl_unescape.3 curl_free.3 curl_strequal.3 curl_mprintf.3 curl_global_init.3 curl_global_cleanup.3 curl_multi_add_handle.3 curl_multi_cleanup.3 curl_multi_fdset.3 curl_multi_info_read.3 curl_multi_init.3 curl_multi_perform.3 curl_multi_remove_handle.3 curl_share_cleanup.3 curl_share_init.3 curl_share_setopt.3 libcurl.3 libcurl-easy.3 libcurl-multi.3 libcurl-share.3 libcurl-errors.3 curl_easy_strerror.3 curl_multi_strerror.3 curl_share_strerror.3 curl_global_init_mem.3 '/usr/ports/ftp/curl/work/stage/usr/local/man/man3'
 install  -o root -g wheel -m 444 libcurl-tutorial.3 curl_easy_reset.3 curl_easy_escape.3 curl_easy_unescape.3 curl_multi_setopt.3 curl_multi_socket.3 curl_multi_timeout.3 curl_formget.3 curl_multi_assign.3 curl_easy_pause.3 curl_easy_recv.3 curl_easy_send.3 curl_multi_socket_action.3 curl_multi_wait.3 '/usr/ports/ftp/curl/work/stage/usr/local/man/man3'
 /bin/mkdir -p '/usr/ports/ftp/curl/work/stage/usr/local/man/man1'
 install  -o root -g wheel -m 444 curl.1 curl-config.1 '/usr/ports/ftp/curl/work/stage/usr/local/man/man1'
 /bin/mkdir -p '/usr/ports/ftp/curl/work/stage/usr/local/bin'
 install  -o root -g wheel -m 555 curl-config '/usr/ports/ftp/curl/work/stage/usr/local/bin'
 /bin/mkdir -p '/usr/ports/ftp/curl/work/stage/usr/local/libdata/pkgconfig'
 install  -o root -g wheel -m 444 libcurl.pc '/usr/ports/ftp/curl/work/stage/usr/local/libdata/pkgconfig'
/usr/bin/make  install-data-hook
cd include && /usr/bin/make install
cd: include: No such file or directory
*** [install-data-hook] Error code 2

Stop in /usr/ports/ftp/curl/work/curl-7.33.0.
*** [install-data-am] Error code 1

Stop in /usr/ports/ftp/curl/work/curl-7.33.0.
*** [install-am] Error code 1

Stop in /usr/ports/ftp/curl/work/curl-7.33.0.
*** [install-recursive] Error code 1

Stop in /usr/ports/ftp/curl/work/curl-7.33.0.
*** [do-install] Error code 1

Stop in /usr/ports/ftp/curl.
*** [install] Error code 1

Stop in /usr/ports/ftp/curl.
```


----------



## wblock@ (Jan 5, 2014)

See how that starts with the "Staging" step?  That means earlier steps have already been done, possibly with errors.  Before trying it again, use `make clean` to remove those earlier files.


----------

