Gordon Henderson | 3fbc564 | 2013-03-24 20:04:07 +0000 | [diff] [blame^] | 1 | |
| 2 | How to install wiringPi |
| 3 | ======================= |
| 4 | |
| 5 | The easiest way is to use the supplied 'build' script: |
| 6 | |
| 7 | ./build |
| 8 | |
| 9 | that should do a complete install or upgrade of wiringPi for you. |
| 10 | |
| 11 | That will install a dynamic library. |
| 12 | |
| 13 | Some distributions do not have /usr/local/lib in the default LD_LIBRARY_PATH. To |
| 14 | fix this, you need to edit /etc/ld.so.conf and add in a single line: |
| 15 | |
| 16 | /usr/local/lib |
| 17 | |
| 18 | then run the ldconfig command. |
| 19 | |
| 20 | sudo ldconfig |
| 21 | |
| 22 | If you want to install a static library, you may need to do this manually: |
| 23 | |
| 24 | cd wiringPi |
| 25 | make static |
| 26 | sudo make install-static |
| 27 | |
| 28 | |
| 29 | To un-install wiringPi: |
| 30 | |
| 31 | ./build uninstall |
| 32 | |
| 33 | |
| 34 | I2C: |
| 35 | |
| 36 | If your system has the correct i2c-dev libraries and headers installed, |
| 37 | then the I2C helpers will be compiled into wiringPi. If you want to |
| 38 | use the I2C helpers and don't have them installed, then under Raspbian, |
| 39 | issue the command: |
| 40 | |
| 41 | sudo apt-get install libi2c-dev |
| 42 | |
| 43 | Consult the documentation for your system if you are not running Raspbian. |
| 44 | |
| 45 | Gordon Henderson |
| 46 | |
| 47 | projects@drogon.net |
| 48 | https://projects.drogon.net/ |