Closed prasadgsk closed 3 years ago
I'm not sure what you're trying to do here. You say you installed gcc and then it looks like you don't have gcc? If you want to install this lib in a RHEL 7 system for example, here's the minimum:
# yum -y install gcc-c++ pkgconfig poppler-cpp-devel python3-devel
# pip3 install pdftotext
You also mentioned a dockerfile, so here's one. I don't have access to RHEL, so it's using CentOS, but it should be basically the same. I just tested that this works:
FROM centos:7
RUN yum -y install gcc-c++ pkgconfig poppler-cpp-devel python3-devel
RUN pip3 install pdftotext
If none of that helps, please say what RHEL version you are using and list the commands that you are issuing, along with their output.
I didn't have this in my Dockerfile, will add this and try it.
RUN yum -y install gcc-c++ pkgconfig poppler-cpp-devel python3-devel
Thank you
Nothing for me to fix here. Closing
Actually we don't need RHEL image. Found that pdftotext has issues with pip install - giving errors related to gcc and poppler.
This worked perfectly fine - conda install -c conda-forge pdftotext FYI - with this, no need to install those dependencies gcc, poppler etc.
I followed this (very good) article and was able to test it fine. just continuumio/miniconda3 image is enough to build your python build image and then run image uses this build image to run your code.
Installed anaconda3 in linux and trying to install pdftotext via Dockerfile (with python version 3.6.8) and getting this error
ran this command as stated in https://pypi.org/project/pdftotext/
Fedora, Red Hat, and friends
sudo yum install gcc-c++ pkgconfig poppler-cpp-devel python3-devel
Complete output (15 lines): WARNING: pkg-config not found--guessing at poppler version. If the build fails, install pkg-config and try again. WARNING: pkg-config not found--guessing at poppler version. If the build fails, install pkg-config and try again. WARNING: pkg-config not found--guessing at poppler version. If the build fails, install pkg-config and try again. running bdist_wheel running build running build_ext building 'pdftotext' extension creating build creating build/temp.linux-x86_64-3.6 gcc -pthread -B /opt/conda/envs/azure36/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPOPPLER_CPP_AT_LEAST_0_30_0=1 -DPOPPLER_CPP_AT_LEAST_0_58_0=1 -DPOPPLER_CPP_AT_LEAST_0_88_0=1 -I/opt/conda/envs/python36/include/python3.6m -c pdftotext.cpp -o build/temp.linux-x86_64-3.6/pdftotext.o -Wall unable to execute 'gcc': No such file or directory error: command 'gcc' failed with exit status 1
I already went though https://github.com/jalan/pdftotext/issues/23, not sure how to fix it. Please let me know how to fix this error.