ERROR: modinfo: could not find module - linux

I am installing new kernel 3.12.x on redhat 6 machine. Below is my steps which I followed to install the new kernel.
extract kernel in /usr/src/ directory
Switch to cd /usr/src/linux-3.12.x
make menuconfig
saved defaults to config file
make
make modules_install
make install
In this process I am getting the following error:
ERROR: modinfo: could not find module fuse
ERROR: modinfo: could not find module autofs4
ERROR: modinfo: could not find module target_core_iblock
ERROR: modinfo: could not find module target_core_file
ERROR: modinfo: could not find module target_core_pscsi
ERROR: modinfo: could not find module target_core_mod
ERROR: modinfo: could not find module configfs
ERROR: modinfo: could not find module 8021q
ERROR: modinfo: could not find module bnx2fc
ERROR: modinfo: could not find module fcoe
ERROR: modinfo: could not find module libfcoe
ERROR: modinfo: could not find module libfc
ERROR: modinfo: could not find module scsi_transport_fc
ERROR: modinfo: could not find module scsi_tgt
ERROR: modinfo: could not find module garp
ERROR: modinfo: could not find module stp
ERROR: modinfo: could not find module llc
ERROR: modinfo: could not find module sunrpc
ERROR: modinfo: could not find module be2iscsi
ERROR: modinfo: could not find module iscsi_boot_sysfs
ERROR: modinfo: could not find module bnx2i
ERROR: modinfo: could not find module cnic
ERROR: modinfo: could not find module uio
ERROR: modinfo: could not find module ib_iser
ERROR: modinfo: could not find module rdma_cm
ERROR: modinfo: could not find module ib_cm
ERROR: modinfo: could not find module iw_cm
ERROR: modinfo: could not find module ib_sa
ERROR: modinfo: could not find module ib_mad
ERROR: modinfo: could not find module ib_core
ERROR: modinfo: could not find module ib_addr
ERROR: modinfo: could not find module iscsi_tcp
ERROR: modinfo: could not find module libiscsi_tcp
ERROR: modinfo: could not find module libiscsi
ERROR: modinfo: could not find module scsi_transport_iscsi
ERROR: modinfo: could not find module cachefiles
ERROR: modinfo: could not find module fscache
ERROR: modinfo: could not find module ipv6
ERROR: modinfo: could not find module dm_mirror
ERROR: modinfo: could not find module dm_region_hash
ERROR: modinfo: could not find module dm_log
ERROR: modinfo: could not find module uinput
ERROR: modinfo: could not find module iTCO_wdt
ERROR: modinfo: could not find module iTCO_vendor_support
ERROR: modinfo: could not find module sg
ERROR: modinfo: could not find module coretemp
ERROR: modinfo: could not find module kvm_intel
ERROR: modinfo: could not find module kvm
ERROR: modinfo: could not find module microcode
ERROR: modinfo: could not find module serio_raw
ERROR: modinfo: could not find module pcspkr
ERROR: modinfo: could not find module i2c_i801
ERROR: modinfo: could not find module i2c_core
ERROR: modinfo: could not find module lpc_ich
ERROR: modinfo: could not find module mfd_core
ERROR: modinfo: could not find module shpchp
ERROR: modinfo: could not find module dm_mod
ERROR: modinfo: could not find module e1000e
ERROR: modinfo: could not find module i5400_edac
ERROR: modinfo: could not find module edac_core
ERROR: modinfo: could not find module i5k_amb
ERROR: modinfo: could not find module ioatdma
ERROR: modinfo: could not find module dca
ERROR: modinfo: could not find module floppy
ERROR: modinfo: could not find module ext4
ERROR: modinfo: could not find module mbcache
Can you guys please help me to resolve this issue?

Create a link like this :
ln -s /usr/src/linux-3.12.x /usr/src/linux
and then proceed with the steps
Check this link : https://unix.stackexchange.com/questions/147478/error-installinig-kernel-on-centos-from-source
2.
Also if 1 doesnt work before your Step 3 copy the .config_XX file from the /boot directory of redhat6 to /usr/src/linux-3.12.x/.config. Then give your step 3 as make oldconfig. Say no to the new features added in the new kernel. Then proceed with step 5.

Related

Problems using pyinstaller flask-desktop

I cannot generate my setup with pyInstaller. When I type command "pyinstaller -w -F myfile.py" here is error below:
app/env/lib/python3.8/site-packages/PyQt5/Qt5/lib/QtNetwork.framework/Versions/5/QtNetwork)
12552 ERROR: Can not find path /usr/lib/libSystem.B.dylib (needed by /Users/macbookpro/Desktop/app/env/lib/python3.8/site-packages/PyQt5/Qt5/lib/QtNetwork.framework/Versions/5/QtNetwork)
12552 ERROR: Can not find path /usr/lib/libz.1.dylib (needed by /Users/macbookpro/Desktop/app/env/lib/python3.8/site-packages/PyQt5/Qt5/lib/QtNetwork.framework/Versions/5/QtNetwork)
12552 ERROR: Can not find path /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork (needed by /Users/macbookpro/Desktop/app/env/lib/python3.8/site-packages/PyQt5/Qt5/lib/QtNetwork.framework/Versions/5/QtNetwork)
12552 ERROR: Can not find path /System/Library/Frameworks/Security.framework/Versions/A/Security (needed by /Users/macbookpro/Desktop/app/env/lib/python3.8/site-packages/PyQt5/Qt5/lib/QtNetwork.framework/Versions/5/QtNetwork)
12553 ERROR: Can not find path /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (needed by /Users/macbookpro/Desktop/app/env/lib/python3.8/site-packages/PyQt5/Qt5/lib/QtNetwork.framework/Versions/5/QtNetwork)
12554 ERROR: Can not find path /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (needed by /Users/macbookpro/Desktop/app/env/lib/python3.8/site-packages/PyQt5/Qt5/lib/QtQmlModels.framework/Versions/5/QtQmlModels)
12554 ERROR: Can not find path /usr/lib/libc++.1.dylib (needed by /Users/macbookpro/Desktop/app/env/lib/python3.8/site-packages/PyQt5/Qt5/lib/QtQmlModels.framework/Versions/5/QtQmlModels)
12554 ERROR: Can not find path /usr/lib/libSystem.B.dylib (needed by /Users/macbookpro/Desktop/app/env/lib/python3.8/site-packages/PyQt5/Qt5/lib/QtQmlModels.framework/Versions/5/QtQmlModels)
12554 ERROR: Can not find path /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (needed by /Users/macbookpro/Desktop/app/env/lib/python3.8/site-packages/PyQt5/Qt5/lib/QtQmlModels.framework/Versions/5/QtQmlModels)
12557 ERROR: Can not find path /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (needed by /Users/macbookpro/Desktop/app/env/lib/python3.8/site-packages/PyQt5/Qt5/lib/QtQuick.framework/Versions/5/QtQuick)
12557 ERROR: Can not find path /System/Library/Frameworks/Metal.framework/Versions/A/Metal (needed by /Users/macbookpro/Desktop/app/env/lib/python3.8/site-packages/PyQt5/Qt5/lib/QtQuick.framework/Versions/5/QtQuick)
12557 ERROR: Can not find path /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (needed by /Users/macbookpro/Desktop/app/env/lib/python3.8/site-packages/PyQt5/Qt5/lib/QtQuick.framework/Versions/5/QtQuick)
12557 ERROR: Can not find path /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (needed by /Users/macbookpro/Desktop/app/env/lib/python3.8/site-packages/PyQt5/Qt5/lib/QtQuick.framework/Versions/5/QtQuick)
12558 ERROR: Can not find path /System/Library/Frameworks/AGL.framework/Versions/A/AGL (needed by /Users/macbookpro/Desktop/app/env/lib/python3.8/site-packages/PyQt5/Qt5/lib/QtQuick.framework/Versions/5/QtQuick)
12558 ERROR: Can not find path /usr/lib/libc++.1.dylib (needed by /Users/macbookpro/Desktop/app/env/lib/python3.8/site-packages/PyQt5/Qt5/lib/QtQuick.framework/Versions/5/QtQuick)
12558 ERROR: Can not find path /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (needed by /Users/macbookpro/Desktop/app/env/lib/python3.8/site-packages/PyQt5/Qt5/lib/QtQuick.framework/Versions/5/QtQuick)
12558 ERROR: Can not find path /usr/lib/libSystem.B.dylib (needed by
Try running this command to make your installer: pyinstaller -w -F myfile.py --hidden-import=PyQt5
If that doesn't work, you could try adding this line: import PyQt5 at the start of the file.
This may make PyInstaller detect the PyQt5 dependency.

How to load ogr2ogr?

I installed ogr2ogr by using npm i ogr2ogr, but when I try to call ogr2ogr from TypeScript, I am getting this error. Can anyone explain how to load ogr2ogr in TypeScript?
ERROR in ./node_modules/fs-constants/browser.js
Module not found: Error: Can't resolve 'constants' in 'D:\Project\webmaps\node_modules\fs-constants'
ERROR in ./node_modules/graceful-fs/polyfills.js
Module not found: Error: Can't resolve 'constants' in 'D:\Project\webmaps\node_modules\graceful-fs'
ERROR in ./node_modules/touch/touch.js
Module not found: Error: Can't resolve 'constants' in 'D:\Project\webmaps\node_modules\touch'
ERROR in ./node_modules/archiver/lib/core.js
Module not found: Error: Can't resolve 'fs' in 'D:\Project\webmaps\node_modules\archiver\lib'
ERROR in ./node_modules/findit/index.js
Module not found: Error: Can't resolve 'fs' in 'D:\Project\webmaps\node_modules\findit'
ERROR in ./node_modules/fs.realpath/index.js
Module not found: Error: Can't resolve 'fs' in 'D:\Project\webmaps\node_modules\fs.realpath'
ERROR in ./node_modules/fs.realpath/old.js
Module not found: Error: Can't resolve 'fs' in 'D:\Project\webmaps\node_modules\fs.realpath'
ERROR in ./node_modules/glob/glob.js
Module not found: Error: Can't resolve 'fs' in 'D:\Project\webmaps\node_modules\glob'
ERROR in ./node_modules/glob/sync.js
Module not found: Error: Can't resolve 'fs' in 'D:\Project\webmaps\node_modules\glob'
ERROR in ./node_modules/graceful-fs/graceful-fs.js
Module not found: Error: Can't resolve 'fs' in 'D:\Project\webmaps\node_modules\graceful-fs'
ERROR in ./node_modules/mkpath/mkpath.js
Module not found: Error: Can't resolve 'fs' in 'D:\Project\webmaps\node_modules\mkpath'
ERROR in ./node_modules/ogr2ogr/modules/zip.js
Module not found: Error: Can't resolve 'fs' in 'D:\Project\webmaps\node_modules\ogr2ogr\modules'
ERROR in ./node_modules/ogr2ogr/modules/csv.js
Module not found: Error: Can't resolve 'fs' in 'D:\Project\webmaps\node_modules\ogr2ogr\modules'
ERROR in ./node_modules/ogr2ogr/modules/util.js
Module not found: Error: Can't resolve 'fs' in 'D:\Project\webmaps\node_modules\ogr2ogr\modules'
ERROR in ./node_modules/ogr2ogr/node_modules/rimraf/rimraf.js
Module not found: Error: Can't resolve 'fs' in 'D:\Project\webmaps\node_modules\ogr2ogr\node_modules\rimraf'
ERROR in ./node_modules/touch/touch.js
Module not found: Error: Can't resolve 'fs' in 'D:\Project\webmaps\node_modules\touch'
ERROR in ./node_modules/walkdir/walkdir.js
Module not found: Error: Can't resolve 'fs' in 'D:\Project\webmaps\node_modules\walkdir'
ERROR in ./node_modules/ogr2ogr/modules/util.js
Module not found: Error: Can't resolve 'os' in 'D:\Project\webmaps\node_modules\ogr2ogr\modules'
ERROR in ./node_modules/archiver/lib/plugins/tar.js
Module not found: Error: Can't resolve 'zlib' in 'D:\Project\webmaps\node_modules\archiver\lib\plugins'
ERROR in ./node_modules/crc32-stream/lib/deflate-crc32-stream.js
Module not found: Error: Can't resolve 'zlib' in 'D:\Project\webmaps\node_modules\crc32-stream\lib'
ERROR in ./node_modules/decompress-zip/lib/extractors.js
Module not found: Error: Can't resolve 'zlib' in 'D:\Project\webmaps\node_modules\decompress-zip\lib'
Date: 2020-07-01T08:24:43.033Z - Hash: b64823683ce88d1548b1
3 unchanged chunks
chunk {main} main.js, main.js.map (main) 42.9 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 4.31 MB [initial] [rendered]
Time: 2627ms
: Compiled successfully.
Date: 2020-07-01T08:37:11.803Z - Hash: e40c5c3bb1b1fec5c8bd
3 unchanged chunks
chunk {main} main.js, main.js.map (main) 44 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 5.82 MB [initial] [rendered]
Time: 12631ms
ERROR in ./node_modules/fs-constants/browser.js
Module not found: Error: Can't resolve 'constants' in 'D:\Project\webmaps\node_modules\fs-constants'
ERROR in ./node_modules/graceful-fs/polyfills.js
Module not found: Error: Can't resolve 'constants' in 'D:\Project\webmaps\node_modules\graceful-fs'
ERROR in ./node_modules/touch/touch.js
Module not found: Error: Can't resolve 'constants' in 'D:\Project\webmaps\node_modules\touch'
ERROR in ./node_modules/archiver/lib/core.js
Module not found: Error: Can't resolve 'fs' in 'D:\Project\webmaps\node_modules\archiver\lib'
ERROR in ./node_modules/findit/index.js
Module not found: Error: Can't resolve 'fs' in 'D:\Project\webmaps\node_modules\findit'
ERROR in ./node_modules/fs.realpath/index.js
Module not found: Error: Can't resolve 'fs' in 'D:\Project\webmaps\node_modules\fs.realpath'
ERROR in ./node_modules/fs.realpath/old.js
Module not found: Error: Can't resolve 'fs' in 'D:\Project\webmaps\node_modules\fs.realpath'
ERROR in ./node_modules/glob/glob.js
Module not found: Error: Can't resolve 'fs' in 'D:\Project\webmaps\node_modules\glob'
ERROR in ./node_modules/glob/sync.js
Module not found: Error: Can't resolve 'fs' in 'D:\Project\webmaps\node_modules\glob'
ERROR in ./node_modules/graceful-fs/graceful-fs.js
Module not found: Error: Can't resolve 'fs' in 'D:\Project\webmaps\node_modules\graceful-fs'
ERROR in ./node_modules/mkpath/mkpath.js
Module not found: Error: Can't resolve 'fs' in 'D:\Project\webmaps\node_modules\mkpath'
ERROR in ./node_modules/ogr2ogr/modules/zip.js
Module not found: Error: Can't resolve 'fs' in 'D:\Project\webmaps\node_modules\ogr2ogr\modules'
ERROR in ./node_modules/ogr2ogr/modules/csv.js
Module not found: Error: Can't resolve 'fs' in 'D:\Project\webmaps\node_modules\ogr2ogr\modules'
ERROR in ./node_modules/ogr2ogr/modules/util.js
Module not found: Error: Can't resolve 'fs' in 'D:\Project\webmaps\node_modules\ogr2ogr\modules'
ERROR in ./node_modules/ogr2ogr/node_modules/rimraf/rimraf.js
Module not found: Error: Can't resolve 'fs' in 'D:\Project\webmaps\node_modules\ogr2ogr\node_modules\rimraf'
ERROR in ./node_modules/touch/touch.js
Module not found: Error: Can't resolve 'fs' in 'D:\Project\webmaps\node_modules\touch'
ERROR in ./node_modules/walkdir/walkdir.js
Module not found: Error: Can't resolve 'fs' in 'D:\Project\webmaps\node_modules\walkdir'
ERROR in ./node_modules/ogr2ogr/modules/util.js
Module not found: Error: Can't resolve 'os' in 'D:\Project\webmaps\node_modules\ogr2ogr\modules'
ERROR in ./node_modules/archiver/lib/plugins/tar.js
Module not found: Error: Can't resolve 'zlib' in 'D:\Project\webmaps\node_modules\archiver\lib\plugins'
ERROR in ./node_modules/crc32-stream/lib/deflate-crc32-stream.js
Module not found: Error: Can't resolve 'zlib' in 'D:\Project\webmaps\node_modules\crc32-stream\lib'
ERROR in ./node_modules/decompress-zip/lib/extractors.js
Module not found: Error: Can't resolve 'zlib' in 'D:\Project\webmaps\node_modules\decompress-zip\lib'

Angular - How to import googleapis library?

I'm trying to incorporate the Google Drive API into one of my projects. The Node.js quick start guide requires me to import file-reading and googleapis libraries. However, when I try to do so, I run into issues when importing it into app.module.ts or any components:
Components import code:
import { Injectable } from '#angular/core';
import {google, drive_v3} from 'googleapis'
const drive = google.drive({version: 'v3'});
#Injectable({
providedIn: 'root'
})
export class SubscriptionService {
constructor () {}
}
Error:
ERROR in ./node_modules/google-auth-library/build/src/auth/googleauth.js
Module not found: Error: Can't resolve 'child_process' in '...\node_modules\google-auth-library\build\src\auth'
ERROR in ./node_modules/google-auth-library/build/src/crypto/node/crypto.js
Module not found: Error: Can't resolve 'crypto' in '...\node_modules\google-auth-library\build\src\crypto\node'
ERROR in ./node_modules/jwa/index.js
Module not found: Error: Can't resolve 'crypto' in '...\node_modules\jwa'
ERROR in ./node_modules/google-auth-library/build/src/auth/googleauth.js
Module not found: Error: Can't resolve 'fs' in '...\node_modules\google-auth-library\build\src\auth'
ERROR in ./node_modules/google-p12-pem/build/src/index.js
Module not found: Error: Can't resolve 'fs' in '...\node_modules\google-p12-pem\build\src'
ERROR in ./node_modules/googleapis-common/build/src/discovery.js
Module not found: Error: Can't resolve 'fs' in '...\node_modules\googleapis-common\build\src'
ERROR in ./node_modules/gtoken/build/src/index.js
Module not found: Error: Can't resolve 'fs' in '...\node_modules\gtoken\build\src'
ERROR in ./node_modules/agent-base/patch-core.js
Module not found: Error: Can't resolve 'https' in '...\node_modules\agent-base'
ERROR in ./node_modules/https-proxy-agent/index.js
Module not found: Error: Can't resolve 'net' in '...\node_modules\https-proxy-agent'
ERROR in ./node_modules/google-auth-library/build/src/auth/googleauth.js
Module not found: Error: Can't resolve 'os' in '...\node_modules\google-auth-library\build\src\auth'
ERROR in ./node_modules/google-auth-library/build/src/auth/googleauth.js
Module not found: Error: Can't resolve 'path' in '...\node_modules\google-auth-library\build\src\auth'
ERROR in ./node_modules/gaxios/build/src/gaxios.js
Module not found: Error: Can't resolve 'stream' in '...\node_modules\gaxios\build\src'
ERROR in ./node_modules/google-auth-library/build/src/auth/oauth2client.js
Module not found: Error: Can't resolve 'stream' in '...\node_modules\google-auth-library\build\src\auth'
ERROR in ./node_modules/googleapis-common/build/src/apirequest.js
Module not found: Error: Can't resolve 'stream' in '...\node_modules\googleapis-common\build\src'
ERROR in ./node_modules/jws/lib/data-stream.js
Module not found: Error: Can't resolve 'stream' in '...\node_modules\jws\lib'ERROR in ./node_modules/jws/lib/sign-stream.js
Module not found: Error: Can't resolve 'stream' in '...\node_modules\jws\lib'ERROR in ./node_modules/jws/lib/verify-stream.js
Module not found: Error: Can't resolve 'stream' in '...\node_modules\jws\lib'ERROR in ./node_modules/https-proxy-agent/index.js
Module not found: Error: Can't resolve 'tls' in '...\node_modules\https-proxy-agent'
How do I properly import the googleapis library in Angular? I've tried adding the following script import to index.html as lots of people online suggest, but it doesn't seem to work (see comments).
<script src="https://apis.google.com/js/api.js"></script>
I have also made sure to perform the following installs:
npm install --save #types/gapi
npm install --save #types/gapi.auth2
npm install --save #types/gapi.client.drive
googleapis (and google-auth-library) is a NodeJS library. You can't use it in front-end projects as is. There're some workarounds - see https://medium.com/angular-in-depth/google-apis-with-angular-214fadb8fbc5 (but I didn't try it personally so can't recommend).
The other lib you mentioned - https://apis.google.com/js/api.js - is the right one, it's for front-end, but it's not modularized, it's just one big script that you need to load via script tag. That's because you cannot import it via import. To make TS compiler happy (providing you already installed types #types/gapi*) add this import in a file where you accessing gapi global object:
/// <reference types="gapi.client. drive" />

Issue installing pdftotext in Python 3.6 on CentOS due to poppler

I'm having some issues getting installing pdftotext in Python 3.6 (Anaconda 5.1.0) on CentOS.
Some quick notes first:
I'm using CentOS 6.7 on VirtualBox
I know it can work because my IT group has it installed on our server. NOTE: I found that our server did have the C++ wrapper installed and I'm trying to figure out how the got it.
I'm trying to get an existing application to work, so I'm not looking for an alternative to pdftotext the library at this time.
I followed the instructions from the github repo and already tried this step:
Fedora, Red Hat, and friends:
sudo yum install gcc-c++ pkgconfig poppler-cpp-devel python-devel redhat-rpm-config
But the problem seems to be around poppler-cpp-devel. I don't see that package within yum search poppler:
============================= N/S Matched: poppler =============================
poppler-devel.i686 : Libraries and headers for poppler
poppler-devel.x86_64 : Libraries and headers for poppler
poppler-glib.i686 : Glib wrapper for poppler
poppler-glib.x86_64 : Glib wrapper for poppler
poppler-qt.i686 : Qt3 wrapper for poppler
poppler-qt.x86_64 : Qt3 wrapper for poppler
poppler-qt4.i686 : Qt4 wrapper for poppler
poppler-qt4.x86_64 : Qt4 wrapper for poppler
poppler.i686 : PDF rendering library
poppler.x86_64 : PDF rendering library
poppler-data.noarch : Encoding files
poppler-glib-devel.i686 : Development files for glib wrapper
poppler-glib-devel.x86_64 : Development files for glib wrapper
poppler-qt-devel.i686 : Development files for Qt3 wrapper
poppler-qt-devel.x86_64 : Development files for Qt3 wrapper
poppler-qt4-devel.i686 : Development files for Qt4 wrapper
poppler-qt4-devel.x86_64 : Development files for Qt4 wrapper
poppler-utils.x86_64 : Command line utilities for converting PDF files
My IT group gave me the instructions of what they had attempted and I tried installing poppler-devel and poppler-glib. But every time I try pip install pdftotext I'm getting the following output:
[root#localhost stack]# pip install pdftotext
Collecting pdftotext
Using cached https://files.pythonhosted.org/packages/21/35/60094dbadd9de2035873390b1cac25e01da605844eba6a07a53a82fa4adc/pdftotext-2.1.1.tar.gz
Building wheels for collected packages: pdftotext
Building wheel for pdftotext (setup.py) ... error
Complete output from command /root/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-1mu2f1n2/pdftotext/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-khm9zova --python-tag cp36:
/root/anaconda3/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
running bdist_wheel
running build
running build_ext
building 'pdftotext' extension
creating build
creating build/temp.linux-x86_64-3.6
gcc -pthread -B /root/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPOPPLER_CPP_AT_LEAST_0_30_0=0 -I/root/anaconda3/include/python3.6m -c pdftotext.cpp -o build/temp.linux-x86_64-3.6/pdftotext.o -Wall
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
pdftotext.cpp:3:42: error: poppler/cpp/poppler-document.h: No such file or directory
pdftotext.cpp:4:40: error: poppler/cpp/poppler-global.h: No such file or directory
pdftotext.cpp:5:38: error: poppler/cpp/poppler-page.h: No such file or directory
pdftotext.cpp:20: error: ‘poppler’ has not been declared
pdftotext.cpp:20: error: ISO C++ forbids declaration of ‘document’ with no type
pdftotext.cpp:20: error: expected ‘;’ before ‘*’ token
pdftotext.cpp: In function ‘void PDF_clear(PDF*)’:
pdftotext.cpp:26: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp:27: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp: In function ‘int PDF_create_doc(PDF*)’:
pdftotext.cpp:66: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp:66: error: ‘poppler’ has not been declared
pdftotext.cpp:67: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp: In function ‘int PDF_unlock(PDF*, char*)’:
pdftotext.cpp:75: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp: In function ‘int PDF_init(PDF*, PyObject*, PyObject*)’:
pdftotext.cpp:105: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp: In function ‘PyObject* PDF_read_page(PDF*, int)’:
pdftotext.cpp:119: error: ‘poppler’ has not been declared
pdftotext.cpp:119: error: expected initializer before ‘*’ token
pdftotext.cpp:120: error: ‘poppler’ has not been declared
pdftotext.cpp:120: error: expected ‘;’ before ‘layout_mode’
pdftotext.cpp:123: error: ‘page’ was not declared in this scope
pdftotext.cpp:123: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp:129: error: ‘poppler’ has not been declared
pdftotext.cpp:129: error: expected initializer before ‘rect’
pdftotext.cpp:130: error: ‘rect’ was not declared in this scope
pdftotext.cpp:133: error: ‘layout_mode’ was not declared in this scope
pdftotext.cpp:133: error: ‘poppler’ has not been declared
pdftotext.cpp:135: error: ‘poppler’ has not been declared
pdftotext.cpp:137: error: ‘poppler’ has not been declared
pdftotext.cpp:138: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
error: command 'gcc' failed with exit status 1
----------------------------------------
Failed building wheel for pdftotext
Running setup.py clean for pdftotext
Failed to build pdftotext
Installing collected packages: pdftotext
Running setup.py install for pdftotext ... error
Complete output from command /root/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-1mu2f1n2/pdftotext/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-ghuhvuhl/install-record.txt --single-version-externally-managed --compile:
/root/anaconda3/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
warnings.warn(msg)
running install
running build
running build_ext
building 'pdftotext' extension
creating build
creating build/temp.linux-x86_64-3.6
gcc -pthread -B /root/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -DPOPPLER_CPP_AT_LEAST_0_30_0=0 -I/root/anaconda3/include/python3.6m -c pdftotext.cpp -o build/temp.linux-x86_64-3.6/pdftotext.o -Wall
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
pdftotext.cpp:3:42: error: poppler/cpp/poppler-document.h: No such file or directory
pdftotext.cpp:4:40: error: poppler/cpp/poppler-global.h: No such file or directory
pdftotext.cpp:5:38: error: poppler/cpp/poppler-page.h: No such file or directory
pdftotext.cpp:20: error: ‘poppler’ has not been declared
pdftotext.cpp:20: error: ISO C++ forbids declaration of ‘document’ with no type
pdftotext.cpp:20: error: expected ‘;’ before ‘*’ token
pdftotext.cpp: In function ‘void PDF_clear(PDF*)’:
pdftotext.cpp:26: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp:27: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp: In function ‘int PDF_create_doc(PDF*)’:
pdftotext.cpp:66: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp:66: error: ‘poppler’ has not been declared
pdftotext.cpp:67: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp: In function ‘int PDF_unlock(PDF*, char*)’:
pdftotext.cpp:75: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp: In function ‘int PDF_init(PDF*, PyObject*, PyObject*)’:
pdftotext.cpp:105: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp: In function ‘PyObject* PDF_read_page(PDF*, int)’:
pdftotext.cpp:119: error: ‘poppler’ has not been declared
pdftotext.cpp:119: error: expected initializer before ‘*’ token
pdftotext.cpp:120: error: ‘poppler’ has not been declared
pdftotext.cpp:120: error: expected ‘;’ before ‘layout_mode’
pdftotext.cpp:123: error: ‘page’ was not declared in this scope
pdftotext.cpp:123: error: ‘struct PDF’ has no member named ‘doc’
pdftotext.cpp:129: error: ‘poppler’ has not been declared
pdftotext.cpp:129: error: expected initializer before ‘rect’
pdftotext.cpp:130: error: ‘rect’ was not declared in this scope
pdftotext.cpp:133: error: ‘layout_mode’ was not declared in this scope
pdftotext.cpp:133: error: ‘poppler’ has not been declared
pdftotext.cpp:135: error: ‘poppler’ has not been declared
pdftotext.cpp:137: error: ‘poppler’ has not been declared
pdftotext.cpp:138: error: type ‘<type error>’ argument given to ‘delete’, expected pointer
error: command 'gcc' failed with exit status 1
----------------------------------------
Command "/root/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-1mu2f1n2/pdftotext/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-ghuhvuhl/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-1mu2f1n2/pdftotext/
I'm assuming the problem here is that it's looking for the C++ compiled files and I could only get the glib?
What I can look into?
pdftotext should be in poppler-utils, so try yum install poppler-utils
EDIT: Hmm. There's a package called pypoppler available for CentOS 6 in the EPEL repository, which describes itself as "Python bindings for the Poppler PDF rendering library." I see no indication that it includes poppler/cpp/{anything}, but you can give it a try. (You may need to install pycairo first.)
Failing that, you might try installing an earlier version of pdftotext (e.g. pip install pdftotext==1.0.0) to find one compatible with CentOS 6. The earliest version came out in June of 2017, though, so that may not help.
I don't suppose you're interested in upgrading to CentOS 7?
There actually is a proper CentOS 7 package. It is not enough to install the poppler-devel package as it does not include the CPP header files that is required and you simply need to install the poppler-cpp and poppler-cpp-devel packages:
yum install poppler-cpp poppler-cpp-devel
After this you can pip/pip3 install the pdftotext package without custom compiling and setting environment path variables.
I found the solution to this. By following the instructions for installing libpoppler-cpp from this link, I was able to successfully install the pdftotext.
Following the instructions from this repo:
On CentOS
On CentOS the libpoppler-cpp library is not included with the system so we need to build from source. Note that recent versions of poppler require C++11 which is not available on CentOS, so we build a slightly older version of libpoppler.
# Build dependencies
yum install wget xz libjpeg-devel openjpeg2-devel
# Download and extract
wget https://poppler.freedesktop.org/poppler-0.47.0.tar.xz
tar -Jxvf poppler-0.47.0.tar.xz
cd poppler-0.47.0
# Build and install
./configure
make
sudo make install
By default libraries get installed in /usr/local/lib and /usr/local/include. On CentOS this is not a default search path so we need to set PKG_CONFIG_PATH and LD_LIBRARY_PATH to point R to the right directory:
export LD_LIBRARY_PATH="/usr/local/lib"
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig"

Library Linking errors in Linux: symbol lookup error :RegisterGlobalAtExitNotification

I get the following runtime error on Linux.
/opt/intel/opencl-1.2-6.4.0.25/lib64/libclang_compiler.so: error: symbol lookup error: undefined symbol: RegisterGlobalAtExitNotification (fatal)
Which library should I link with to resolve these errors?

Resources