I am new to Linux and wonder why many times when I install package with
yum I need to install
package-devel.i386 rather than
package.i386. What is the difference between them?
Normally a package will contain binaries, libraries, and other resources, so that programs linked against those libraries can run.
But when you need to build a package, header files are required normally, in this case, you install theose -devel packages to supply the desired header file.
Try to learn more about C/C++ build mechanism to help you understand this better.