**This page should use cross references to avoid duplicate content. Please help us by cleaning it up. ?** **Contents** [[!toc levels=2]] #See [README.Linux](http://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc/bootstrap/README.Linux) [pkgsrc guide](http://www.netbsd.org/docs/pkgsrc/) #Software requirements Before you can use pkgsrc, you may need a few packages installed on your Linux system upfront. * gcc (and libstdc++) * libncurses-devel * zlib and zlib-devel * openssl-devel (optional but required for some packages) * libudev-dev (optional but required for some packages) The names may vary, depending on what Linux distribution you are using. Also be mindful of the platform you are using (eg. i686 vs. x86_64 - some have different pre-required packages). Also note that some very basic tools such as file, patch, sed, and others are required, as well. #Troubleshooting bootstrap ##Shell's echo command is not BSD-compatible If you see this error ERROR: Your shell's echo command is not BSD-compatible. This error is known to occur if /bin/sh is linked to /bin/dash (recent Ubuntu versions). The fix is to issue the following before commencing bootstrap: export SH=/bin/bash ##ARG_MAX undeclared If bootstrap stops at In file included from glob.c:12: __glob13.c: In function globextend: __glob13.c:836: error: ARG_MAX undeclared (first use in this function) Then apply this patch [1](http://mail-index.netbsd.org/pkgsrc-bugs/2008/06/21/msg026977.html) ##FORTIFY_SOURCE If bootstrap stops at /usr/pkgsrc/bootstrap/work/bmake/arch.c: In function 'Arch_Touch': /usr/pkgsrc/bootstrap/work/bmake/arch.c:1038: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result *** Error code 1 This error occurs because Linux uses -DFORTIFY_SOURCES by default. Bootstrap can be achieved by: CFLAGS="-U_FORTIFY_SOURCE" ./bootstrap ##libncurses not installed If bootstrap stops at ERROR: This package has set PKG_FAIL_REASON: ERROR: No usable termcap library found on the system. Then install the libncurses-dev package On an RPM based system this might be via 'yum install ncurses-devel', and on a Debian/Ubuntu system 'apt-get install libncurses5-dev'