complete PDF
Complete EPUB
One page


4_install PDF

(pdf) (epub) (1 page)
1 Intro
2 What is Sane?
3 Buying a scanner
4 How do I install
5 It doesn't work
6 Scanner specifics
7 . SCSI problems
8 Paralel port scanners
9 USB Problems
10 Network-scanning
11 I can make a scan! Great, what's next?

4. How do I install

4.1. How do I get SANE?

Depending on your computer knowledge, you'd better download the sources for SANE or a prebuilt binary.

For Fedora, there are different RPM's. The RPM's are usually on the distribution CD and may have already been installed if you used a standard install. Try typing

xsane If it starts, SANE is already installed. If SANE is not yet installed, or if you need a more recent version or if you have another reason, download the sources.

Up-to-date SANE sources and (more or less) up-to-date binaries for several platform are available at http://www.sane-project.org/source.html Please, try to use a mirror.

Download the recent versions of sane-backends, sane-frontends and xsane. Xsane is not mandatory, but it is a convenient frontend.

4.2. OK, I downloaded the sources. What's next?

Untar the stuff:

 tar -xvzf sane-backends*.tgz
 tar -xvzf sane-frontends*.tgz
 tar -xvzf xsane-*.tgz

Look at the readme-files. They contain information that is allways more current than this FAQ.

Go to the sane-backends directory and type

 ./configure

At the end of the configure, there may be a warning that SANE is already installed. That means that a possible conflict between the pre-installed version and the one you're about to compile may arise. Unless you know what you are doing, remove the old version. (


 rpm -e sane xsane

on RPM-based systems). Type make Enjoy the compile, especially all the warnings ;-). The warnings are qualified as "Must be checked but mostly harmless". If you want to see some more warnings try ./configure --enable-warnings

Su to root (you weren't compiling all the stuff as root I hope? If you were: read some books about security). Type make install.

Go to the sane-frontends directory and repeat the process:

 ./configure
 make

su to root and

 make install

And the same for Xsane.

Next make sure your scanner is connected and on and run:

 sane-find-scanner

If everything went well, You should find your scanner on the screen. The only thing sane-find-scanner does is to send a SCSI inquiry command to all SCSI devices and put out information about all devices of type "scanner" and "processor".

For USB scanners, do a

 cat /proc/bus/usb/devices

If your scanner is not there, something is wrong with your connection (is ir plugged-in, is the scanner on?) or with your kernel configuration. Next run

scanimage -L Your scanner should be there too. If it is not: it is probably not supported. In some cases, the backend is commented out in /etc/sane.d/dll.conf by someone. Make sure that the required backend is available. So next thing is to type:

 xsane &

4.3. Why do I have to compile everything? Why are there no binary distributions?

Sane is not platform-dependend. This means that a lot of binaries are possible:

etcetera.

And this all for every processor the OS runs on and version of the OS. That is just too many. Having said that, the download-page contains some links to binaries for popular operatingsystems (at the bottom). If you made or found another binary distribution send us an URL.

Most Linux distributions add a compiled version to their distribution or allow you to download it. Look at your favourite distributer's web-site.

4.4. I use redhat 8.0 and I keep my system updated, and network scanning suddenly stopped working (device busy)

Please upgrade to a more recent distro.

Redhat does not keep all the binaries current on their updates.redhat.com site.

If you run into this problem, un-install the SANE-RPM's and compile them from source. In this way, you'll be sure that all files are correct.

For the moment, there are updated binaries on http://hvdkooij.xs4all.nl/software.rpm.en.cms The latest versions of sane-backends solve the device busy problem. The rpm with override your /etc/sane.d/sane.conf file, so you'll need to copy the /etc/sane.d/sane.conf.rpmsave to /etc/sane.d/sane.conf.

4.5. Where is everything?

If you installed the SANE-sources from Mostang and compiled & installed them, SANE sits under /usr/local If you installed aan RPM, you'll find SANE under /usr

The reason for this difference is, that /usr seems to be reserved for packages from the distribution and /usr/local for all local additions.

4.6. Xsane: make stops with /bin/sh: no: command not found

The full message looks like:

 file=./`echo cs | sed 's,.*/,,'`.gmo \
   && rm -f $file && PATH=../src:$PATH no -o $file cs.po
 /bin/sh: no: command not found
 make: *** [cs.gmo] Error 127

There is a problem with SANE and NLS (Natural Language Support) on your system. Re-run the configure with NLS disabled:

 ./configure --disable-nls

Next, clean-up and recompile:

 make clean
 make

Xsane will work normally without NLS support.

This should be solved in 0.93.

4.7. I can't compile SANE on my-favorite-OS. What can I do ?

First of all, have you checked that SANE is available for your platform in the supported platforms list? http://www.sane-project.org/sane-support.html You'd better try the latest available version.

You may need to download and/or build some external programs or libraries to compile some parts of SANE. You'd better use the latest versions of those external programs/libraries, unless the README file request a particular version.

On some platforms, you may need to use a particular version of make or of the C compiler (the GNU-version If anyone succeeded without GNU make give me (ljm) a mail).

Xsane has been ported to Windows.

When you succeed in compiling sane on a currently unmentioned OS, please send a note to the mailinglist. Also send a note to the mailinglist if you compiled a newer SANE version than mentioned in the platforms list or if you use a different compiler. Generally every report about anything but Linux/i386 is very welcome.

4.8. Can I use xsane with GIMP 2?

Yes, as long as you have a recent version. If you don't, you should upgrade.

4.9. ERROR: SANE is needed for compiling sane-frontends

The config-script for the front-ends complains "ERROR: SANE is needed for compiling sane-frontends" It may be necessary to put /usr/local/lib in /etc/ld.so.conf if it's not searched by default. Don't forget to run ldconfig (as root) afterwards. You may use

LD_LIBRARY_PATH=/usr/local/lib ./configure

instead (if you are not root on your system). There is a comment about this in INSTALL.

Note that default RedHat 6.2 installations do not have /usr/local/lib in /etc/ld.so.conf

4.10. The xsane-config-script refuses to make a GIMP-plugin

During the .fixed ./configure you will probably see messages like:

 checking for gimp-config... no
 checking for gimptool... no
 checking for libgimp/gimp.h... no
 checking for libgimp/gimpfeatures.h... no
 *** Could not run GIMP test program, checking why...
...
 * - GIMP plugin  deactivated

Most distributions split library packages into two parts: the normal one containing the libraries and the -dev (or devel) version containing headers and tools like gimp-config Install the libgimp-dev (or devel) package.

4.11. Errors including SCSI-headers.

On a normal distribution, SCSI-headers may be different from what you have in your kernel sources. Copying the SCSI-headers to your include-dir should solve this problem.

 cp -a /usr/src/linux/include/scsi /usr/include

4.12. Compling Sane aborts with xscanimage.c:63: parse error before `GParam'

From GIMP 1.1.25 on, type definitions in GIMP have been changed. Edit xscanimage.c and search the line with

 #include <libgimp/gimp.h>

Above this line insert a line with:

#define GIMP_ENABLE_COMPAT_CRUFT

Edit xsane.h in the same way.

Recompile and think about getting a more recent version of SANE.

4.13. I want to do a clean installation. How do I get rid of all the older versions?

Since SANE 1.0.5 there is a make uninstall which removes SANE completely. However it only removes from the current prefix, so if the old SANE is located in /usr and you use the standard SANE sources, it won't be removed. Configure will warn about old versions at different locations if it can find them.

There is no filelist for older versions, and there are more places where you can install sane. The following will remove most ofthe sane-files:

 find /usr -name "*sane*" -type f -print -exec rm {} \;
 find /usr -name "*sane*" -type d -print -exec rmdir {} \;

Some caution is needed: this removes anything that looks like sane. This may include other applications, files or the tgz of your new version, as I found out myself :-(

Alternatively remove the following directories:

- /usr/(local)/lib/sane - /usr/(local)/lib/libsane* - /usr/(local)/include/sane - /usr/(local)/etc/sane.d - /usr/(local)/share/sane* - /usr/(local)/bin/scanimage - /usr/(local)/bin/xscanimage - /usr/(local)/bin/xsane - /usr/(local)/share/sane/xsane

This may leave some files for natural language support ( xsane.mo and possibly sane-umax.mo and sane-pnm.mo ). Use find to find them.

4.14. I want only one backend. Must I compile the others?

You can set an environment variable to limit the number of backends, e.g.:

 export BACKENDS="net mustek mustek_usb"
 ./configure

This will limit the backends to net, mustek and mustek_usb. You'll need to know the names of the backends that you want.