Steps for install libnfc in Ubuntu:

1.Install libtool:
$sudo apt-get install libtool

2.Install libudev-dev:
$sudo sudo apt-get install libudev-dev
  
3. Install libusb:
$ sudo apt-get install libusb-dev libpcsclite-dev
$ sudo apt-get install libccid libusb-0.1-4 pcscd libftdi1 libpcsclite1
  
4. Download and decompress the source code:
$ wget http://libnfc.googlecode.com/files/libnfc-1.5.0.tar.gz
$ tar –xvzf libnfc-1.5.0.tar.gz
  
NOTE1: libnfc-1.5.0 is stable version, we tried 1.5.0-rz1, is not stable


5. Setup and compile:

$ cd libnfc-1.5.0
$ sudo ./configure –with-drivers=pn532_uart --enable-serial-autoprobe  #DO NOT FORGET THE LAST OPTION
$ sudo make clean
$ sudo make
$ sudo make install
  


NOTE: if you encounter the problem saying "have unmet dependencies ...." when installing libudev-dev

you can try

$sudo apt-get install libudev0=175-0ubuntu9

then try

$sudo apt-get install libudev-dev


DO remember the method to solve the unmet dependencies! try to add a version number(like =175-0ubuntu9)


you can also try the following command line if you encounter such a notification from apt-get:


You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 g++-4.7 : Depends: gcc-4.7-base (= 4.7.2-11precise2) but it is not going to be installed
           Depends: gcc-4.7 (= 4.7.2-11precise2) but it is not going to be installed
           Depends: libstdc++6-4.7-dev (= 4.7.2-11precise2) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

Try with the following commands in order:
- sudo apt-get autoclean
- sudo apt-get -f install
- sudo dpkg --configure -a
- sudo apt-get -f install
Let's see if this fixes the problem

你可能感兴趣的:(Steps for install libnfc in Ubuntu:)