How Do You Troublshoot the Error “ fatal error: snappy-c.h: No such file or directory” when Trying to Install Apache Parquet?

Problem scenario
When trying to install Apache Parquet on Ubuntu, you get this error:

Running python-snappy-0.5.1/ -q bdist_egg --dist-dir /tmp/easy_install-SIHL_T/python-snappy-0.5.1/egg-dist-tmp-O8UnkU
WARNING: '.' not a valid package name; please use only .-separated package names in
package init file '' not found (or not a regular file)
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ fatal error: snappy-c.h: No such file or directory
compilation terminated.
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
ubuntu@ubuntuf1:/opt/parquet-1.2$ find . -name
ubuntu@ubuntuf1:/opt/parquet-1.2$ sudo apt-get install python-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-dev is already the newest version (2.7.11-1).
0 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.

What should you do?

Run this command to install libsnappy-dev (a dependency for installing Apache Parquet):
sudo apt-get -y install libsnappy-dev

Leave a comment

Your email address will not be published. Required fields are marked *