Can't build crc32c(a nodejs package)

user239843 asked:

It’s not really nodejs related.

It’s a C implementation.

Firstly, while building, it exits with error: “warning: linux/if_alg.h: No such file or directory”. Then I run yum install kernel-devel-{version}, but it doesn’t work.

Secondly when I copy the file from another PC, the error becomes “error: ‘AF_ALG’ undeclared (first use in this function)”.

I have no idea to solve this issue. Please help me.

And here is my PC’s info:
CPU:Intel(R) Xeon(R) CPU E5335 @ 2.00GHz

OS: CentOS 6.5

Kernel-release: 2.6.32-431.5.1.el6.x86_64

My answer:

You’re trying to install the wrong package.

First, attempt to locate the correct package containing the file you need.

yum whatprovides */linux/if_alg.h

Then you will get the mysterious No Matches found error. This means, of course, that the file isn’t provided by any package.

The reason for that is that the file is not in the kernel version shipped by CentOS 6; the kernel feature your program depends on only exists in newer kernels. You will need a newer kernel in order to use this software. The obvious options are to use CentOS 7, or if you won’t upgrade for some reason, a third party kernel such as elrepo.

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.