1 INSTALL - CUPS v2.2.5 - 2017-09-25
2 ==================================
4 This file describes how to compile and install CUPS from source code. For more
5 information on CUPS see the file called "README.txt". A complete change log can
6 be found in "CHANGES.txt".
8 Using CUPS requires additional third-party support software and printer drivers.
9 These are typically included with your operating system distribution. Apple
10 does not endorse or support third-party support software for CUPS.
12 > Note: Current versions of macOS DO NOT allow installation to /usr with the
13 > default System Integrity Protection (SIP) settings. In addition, we do not
14 > recommend replacing the CUPS supplied with macOS because:
16 > a. not all versions of CUPS are compatible with every macOS release,
18 > b. code signing prevents replacement of system libraries and access to the
19 > system keychain (needed for encrypted printer sharing), and
21 > c. software updates will often replace parts of your local installation,
22 > potentially rendering your system unusable.
28 You'll need ANSI-compliant C and C++ compilers, plus a make program and POSIX-
29 compliant shell (/bin/sh). The GNU compiler tools and Bash work well and we
30 have tested the current CUPS code against several versions of GCC with excellent
33 The makefiles used by the project should work with most versions of make. We've
34 tested them with GNU make as well as the make programs shipped by Compaq, HP,
35 SGI, and Sun. BSD users should use GNU make (gmake) since BSD make does not
38 Besides these tools you'll want ZLIB library for compression support, the GNU
39 TLS library for encryption support on platforms other than iOS, macOS, or
40 Windows, and either MIT (1.6.3 or higher) or Heimdal Kerberos for Kerberos
41 support. CUPS will compile and run without these, however you'll miss out on
42 many of the features provided by CUPS.
44 On a stock Ubuntu install, the following command will install the required
47 sudo apt-get install autoconf build-essential libavahi-client-dev \
48 libgnutls28-dev libkrb5-dev libnss-mdns libpam-dev \
49 libsystemd-dev libusb-1.0-0-dev zlib1g-dev
51 Also, please note that CUPS does not include print filters to support PDF or
52 raster printing. You *must* download GPL Ghostscript and/or the Open Printing
53 CUPS filters package separately to print on operating systems other than macOS.
59 CUPS uses GNU autoconf, so you should find the usual "configure" script in the
60 main CUPS source directory. To configure CUPS for your system, type:
64 The default installation will put the CUPS software in the "/etc", "/usr", and
65 "/var" directories on your system, which will overwrite any existing printing
66 commands on your system. Use the `--prefix` option to install the CUPS software
69 ./configure --prefix=/some/directory
71 > Note: Current versions of macOS DO NOT allow installation to /usr with the
72 > default System Integrity Protection (SIP) settings.
74 To see a complete list of configuration options, use the `--help` option:
78 If any of the dependent libraries are not installed in a system default location
79 (typically "/usr/include" and "/usr/lib") you'll need to set the CFLAGS,
80 CPPFLAGS, CXXFLAGS, DSOFLAGS, and LDFLAGS environment variables prior to running
83 setenv CFLAGS "-I/some/directory"
84 setenv CPPFLAGS "-I/some/directory"
85 setenv CXXFLAGS "-I/some/directory"
86 setenv DSOFLAGS "-L/some/directory"
87 setenv LDFLAGS "-L/some/directory"
92 CFLAGS="-I/some/directory" \
93 CPPFLAGS="-I/some/directory" \
94 CXXFLAGS="-I/some/directory" \
95 DSOFLAGS="-L/some/directory" \
96 LDFLAGS="-L/some/directory" \
99 The `--enable-debug` option compiles CUPS with debugging information enabled.
100 Additional debug logging support can be enabled using the
101 `--enable-debug-printfs` option - these debug messages are enabled using the
102 `CUPS_DEBUG_xxx` environment variables at run-time.
104 CUPS also includes an extensive set of unit tests that can be used to find and
105 diagnose a variety of common problems - use the "--enable-unit-tests" configure
106 option to run them at build time.
108 On macOS, use the `--with-archflags` option to build with the correct set of
111 ./configure --with-archflags="-arch i386 -arch x86_64" ...
113 Once you have configured things, just type:
117 or if you have FreeBSD, NetBSD, or OpenBSD type:
121 to build the software.
127 Aside from the built-in unit tests, CUPS includes an automated test framework
128 for testing the entire printing system. To run the tests, just type:
132 or if you have FreeBSD, NetBSD, or OpenBSD type:
136 The test framework runs a copy of the CUPS scheduler (cupsd) on port 8631 in
137 /tmp/cups-$USER and produces a nice HTML report of the results.
140 INSTALLING THE SOFTWARE
141 -----------------------
143 Once you have built the software you need to install it. The "install" target
144 provides a quick way to install the software on your local system:
148 or for FreeBSD, NetBSD, or OpenBSD:
152 Use the BUILDROOT variable to install to an alternate root directory:
154 make BUILDROOT=/some/other/root/directory install ENTER
156 You can also build binary packages that can be installed on other machines using
157 the RPM spec file ("packaging/cups.spec") or EPM list file
158 ("packaging/cups.list"). The latter also supports building of binary RPMs, so
159 it may be more convenient to use.
161 You can find the RPM software at:
165 The EPM software is available at:
167 https://michaelrsweet.github.io/epm
170 CREATING BINARY DISTRIBUTIONS WITH EPM
171 --------------------------------------
173 The top level makefile supports generation of many types of binary distributions
174 using EPM. To build a binary distribution type:
182 for FreeBSD, NetBSD, and OpenBSD. The <format> target is one of the following:
184 - "epm": Builds a script + tarfile package
185 - "bsd": Builds a *BSD package
186 - "deb": Builds a Debian package
187 - "pkg": Builds a Solaris package
188 - "rpm": Builds a RPM package
189 - "slackware": Build a Slackware package
192 GETTING DEBUG LOGGING FROM CUPS
193 -------------------------------
195 When configured with the `--enable-debug-printfs` option, CUPS compiles in
196 additional debug logging support in the scheduler, CUPS API, and CUPS Imaging
197 API. The following environment variables are used to enable and control debug
200 - `CUPS_DEBUG_FILTER`: Specifies a POSIX regular expression to control which
202 - `CUPS_DEBUG_LEVEL`: Specifies a number from 0 to 9 to control the verbosity of
203 the logging. The default level is 1.
204 - `CUPS_DEBUG_LOG`: Specifies a log file to use. Specify the name "-" to send
205 the messages to stderr. Prefix a filename with "+" to append to an existing
206 file. You can include a single "%d" in the filename to embed the current
213 If you have problems, *read the documentation first*! If the documentation does
214 not solve your problems, please post a message on the users forum at:
216 https://www.cups.org/
218 Include your operating system and version, compiler and version, and any errors
219 or problems you've run into. The "config.log" file and the output from the
220 configure script and make should also be sent, as it often helps to determine
221 the cause of your problem.
223 If you are running a version of Linux, be sure to provide the Linux distribution