Published Book on Amazon
|All of IOT Starting with the Latest Raspberry Pi from Beginner to Advanced – Volume 1|
|All of IOT Starting with the Latest Raspberry Pi from Beginner to Advanced – Volume 2|
출판된 한글판 도서
|최신 라즈베리파이(Raspberry Pi)로 시작하는 사물인터넷(IOT)의 모든 것 – 초보에서 고급까지 (상)|
|최신 라즈베리파이(Raspberry Pi)로 시작하는 사물인터넷(IOT)의 모든 것 – 초보에서 고급까지 (하)|
Original Book Contents
17.5.4 Installing Programs Distributed in the General File Format
Among the developed programs, programs that are composed in the form of general source code or executable files other than the form of packages are not registered and distributed in the package repository, and those should be distributed and installed in a separate way.
If the file of the distributed program is a binary executable file, you can run the program using that file. The following ways are available to install and run programs using these executable file:
■ How to convert executable file into package file and install it properly on the system
This is the method that converts the executable file into a package format supported by the system and then installs it through a normal procedure. How to create a package is not described here. If necessary, please search the materials separately.
■ How to use the executable file intactly without doing a separate installation
This is the method that does not install the program formally in the system, but specify an appropriate place to store the program, store the executable file, and then use the executable file as it is. Because it is not installed on the system, it is not possible to use various program management systems that the system supports. Because the system does not manage the program when you run the program, the system do not know where the executable is, so in addition, you need to provide a way for the system to find it or specify exactly where the executable is located.
If the downloaded program is not yes compiled into a binary executable file, you should use it after creating such executable file separately. The command to create an executable file is "build". This will be explained in more detail separately in the later section related to program development.
Running this command, a compiled binary executable for the corresponding program is created. When you run this command, it must be run in the directory where the downloaded source code file is located.
The following performs the steps to download the <WiringPi> library package from GitHub and install it. The downloaded data is in the <wiringPi> directory in the home directory of the "pi" user account.
pi@raspberrypi ~ $ git clone --depth 1 git://git.drogon.net/wiringPi
The program file downloaded here is not created yet as a file of executable file, but is the file of development source code format, so it can not be used. Therefore, in order to execute these files, it is necessary to first convert it into binary executable files. To do this, go to the <wiringPi> directory and run the "build" script included inside.
pi@raspberrypi ~ $ cd wiringPi
pi@raspberrypi ~/wiringPi $ ./build
wiringPi Build script
NOTE: To compile programs with wiringPi, you need to add:
to your compile line(s) To use the Gertboard, MaxDetect, etc.
code (the devLib), you need to also add:
to your compile line(s).
To verify that the executable file is created normally, execute the following command to check if it is processed normally.
pi@raspberrypi ~/wiringPi $ gpio -v
gpio version: 2.26
Copyright (c) 2012-2015 Gordon Henderson
This is free software with ABSOLUTELY NO WARRANTY.
For details type: gpio -warranty
Raspberry Pi Details:
Type: Model B+, Revision: 1.2, Memory: 512MB, Maker: Sony