I'm using CentOS 6.4 and I'm trying to install the R package 'rPython'. It failed with following messages. Anybody knows how to fix this? Thanks!
/usr/bin/ld: /usr/local/lib/python2.7/config/libpython2.7.a(dictobject.o): relocation R_X86_64_32S against `PyDict_Type' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/python2.7/config/libpython2.7.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [rPython.so] Error 1
ERROR: compilation failed for package ‘rPython’
* removing ‘/usr/lib64/R/library/rPython’
It seems that the default installation of Python on RHEL / CentOS,
etc. is not "shared enabled", i.e., it does not include libpython*.so. Just the libpython*.a static library. This prevents some Python
applications to run properly. There are instructions in different
places, (e.g., here or here) indicating how to install Python as a shared library on CentOS and related Linux flavours.
Related
I am trying to install the package GWmodel from source following this website. After running install_github(lbb220/GWmodel/GWmodel) I am receiving this error: Error: Failed to install 'unknown package' from GitHub: Line starting '<<<<<<< HEAD ...' is malformed!
The reason I want to to install the package from source and not use the install.packages("GWmodel") is that I want to use parallel.method = "cuda". In the documentation it says:
Requirements of using CUDA for high-performence computation in GWR functions:
To run GWR-CUDA (i.e. parallel.method is pecified as “cuda”) with gwr.basic , bw.gwr and gwr.model.selection, the following conditions are required:
There is at least one NVIDIA GPU supporting CUDA equipped on user's computer.
CUDA (>10.2) are installed with the environment variable 'CUDA_HOME' set properly.
The package should re-built from source. - For Linux user, 'GWmodelCUDA' will be automatically built if CUDA toolkit could be detected by the complier. - For Windows user, 'GWmodelCUDA.dll' and 'GWmodelCUDA.lib' will be automatically downloaded; however, we would recommend users to build the 'GWmodelCUDA' library manually to avoid some potentially unknown issues, and an 'CMakeLists.txt' file is provided for this procedure.
If any condition above is not satisfied, the GWR-CUDA will not work even though the “parallel.method” is specified as “cuda”.
If I install it using install.github() I am getting the error I mentioned. I have installed the CUDA (>10.2) and I have set the environment variable 'CUDA_HOME' properly.
If I use the install.packages("GWmodel") I get no errors. I also tried to download GWmodel.zip and install from a local zip file, but the same error.
I have install rtools successfully (I tested it using the example here)
I am using R.Studio 1.4.1717, R 4.1.1 and Windows 11.
Any ideas how can I proceed?
I used install_github("lbb220/GWmodel") and although I don't receive the above error, still the installation cannot be done. I am getting the below message now:
** libs
*** arch - i386
"C:/rtools40/mingw32/bin/"g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-41~1.1/include" -DNDEBUG -I'C:/Program Files/R/R-4.1.1/library/Rcpp/include' -I'C:/Program Files/R/R-4.1.1/library/RcppArmadillo/include' -ARMA_64BIT_WORD=1 -fopenmp -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c GWmodel.cpp -o GWmodel.o
GWmodel.cpp: In function 'double sp_gcdist(double, double, double, double)':
GWmodel.cpp:764:29: error: 'DOUBLE_EPS' was not declared in this scope
if (fabs(lat1 - lat2) < DOUBLE_EPS) {
^~~~~~~~~~
GWmodel.cpp:764:29: note: suggested alternative: 'ENABLE_NLS'
if (fabs(lat1 - lat2) < DOUBLE_EPS) {
^~~~~~~~~~
ENABLE_NLS
GWmodel.cpp: In function 'void printMat(arma::mat)':
GWmodel.cpp:1165:16: warning: comparison of integer expressions of different signedness: 'const uword' {aka 'const unsigned int'} and 'int' [-Wsign-compare]
if (m.n_rows < n)
~~~~~~~~~^~~
make: *** [C:/PROGRA~1/R/R-41~1.1/etc/i386/Makeconf:245: GWmodel.o] Error 1
ERROR: compilation failed for package 'GWmodel'
* removing 'C:/Program Files/R/R-4.1.1/library/GWmodel'
Warning message:
In i.p(...) :
installation of package ‘C:/Users/GEOGRA~1/AppData/Local/Temp/RtmpOwWBPs/file8f43609514d/GWmodel_2.2-0.tar.gz’ had non-zero exit status
This is because you are not actually installing from the main repository. Try install_github(lbb220/GWmodel).
Recently we have downgraded R(latest) to 3.3.0 to RHEL.
Which requires to install xlsx and other rJava dependent packages, though I have deep dived into every possible duplicate and tried all options.
Details:
Command Executed
R CMD javareconf
Error:
.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/lib64/R/lib64/R/lib/libR.a(CommandLineArgs.o): could not read symbols: Bad value
collect2: ld returned 1 exit status
make[2]: *** [libjri.so] Error 1
make[2]: Leaving directory /tmp/RtmpH1WhQR/R.INSTALL4a1266bbb309/rJava/jri/src'
`
Net search: I searched and found following link
https://github.com/BVLC/caffe/issues/2171 suggests to use
export CXXFLAGS=-fPIC
but no luck also I do not see CMakeCache.txt in the R folder, still not clear which piece I am missing and any help will be highly appreciated.
NOTE: This might seem to be a duplicate, but seriously I have already tried all the related/relevant posts on stackoverflow.
I resolved this, by manually placing the rJava folder(which I had in a different environment while we used R latest version), while entering into R add this following command before installing rJava dependant libraries:
.libPaths("/usr/lib64/R/library")
Change the path to the path where R is installed.
Hope this helps.
I am trying to install the R (R version 3.2.4 Revised) package 'rgdal' onto my Linux, Ubuntu 14.04, but the package is having difficulties when it tries to load dependencies, specifically sqlite.
The error is as follows:
checking for gdal.h... yes
checking gdal: linking with --libs only... no
checking gdal: linking with --libs and --dep-libs... no
/usr/lib/libgdal.so: undefined reference to `sqlite3_column_table_name'
collect2: error: ld returned 1 exit status
I updated GDAL/OGR per the instructions here, because I thought that may be the issue. Now when I type gdalinfo or ogrinfo into the terminal a similar error appears:
gdalinfo: symbol lookup error: /usr/lib/libgdal.so.1: undefined
symbol: sqlite3_column_table_name
When I look in my usr/local/lib the following sqlite libraries are present:
libsqlite3.a libsqlite3.la libsqlite3.so libsqlite3.so.0
libsqlite3.so.0.8.6
The funny thing is that this package was working fine in R last week and now is broken...
Any help appreciated! Thanks.
-Caitlin
Stumbled across this error when I was trying to upgrade GDAL. The fix was to ENABLE_COLUMN_METADATA when I was configuring sqlite for install with
sudo CFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA=1" ./configure
See the sqlite Compile-time options for more details
Sounds like a problem with that shared library, have install/update anything in your system without using your Package Manager? (I believe its apt?)
The libgdal.so.1 in your system was compiled against some version of the libsqlite libraries, which now after you updated something else, have changed but libgdal is still the same file.
I have never used Ubuntu, but in the Linux i use (arch) this is the reason partial updates are discouraged (like updating only one program, for example)
So I would recommend to try a full system update, or at least update the sqllite libraries.
I'm trying to compile Qscintilla 2.9.2 on Ubuntu 16.04 64bit using Qt 5.7 got the following error message:
-L/home/mwambi/Qt5.7.0/5.7/gcc_64/lib -lQt5PrintSupport -L/usr/lib64 -lQt5Widgets -lQt5Gui -lQt5Core -lpthread -lGL
/usr/bin/ld: cannot find -lGL
collect2: error: ld returned 1 exit status
Makefile:979: recipe for target 'libqscintilla2.so.12.0.1' failed
make: *** [libqscintilla2.so.12.0.1] Error 1
I do not know what the library GL is and where to find it. How can I solve this?
In my experience, this troubleshooting procedure is enough to solve about 90% of missing library issues during compilation:
"-l[name]" implies there's a "lib[name].so"
Search your system for "lib[name]" (use locate or find).
If you find it on your system, check paths ($LB_LIBRARY_PATH and the build system's -L flags) and verify that the architecture matches (x86+64 vs. i686).
Do a repository search for "lib[name]" (use apt, yum, synaptic, &c.).
Install it if it's missing.
Type "lib[name].so" into google or a dedicated package-search site (like RPMFind or packages.ubuntu.com) and see what package names come up, then search for as in #2-3.
In this case, libGL is an implementation of OpenGL. You can install Mesa or find an alternative implementation (I've only ever used Qt with Mesa). Here's a list of packages that provide libGL; if you already have one of these installed on your system, try fetching the dev versions of whichever ones you already have.
I am making .deb package for the QT 5 .2.1 desktop app for ubuntu 14.04 64 bit. I have installed QT 5.2.1 on Ubuntu 14.04 and made a demo app for the testing purpose in which I have used quazip library. During making the .deb package of the app I am getting the below issue.
dpkg-shlibdeps: error: couldn’t find library libquazip.so.1 needed by debian/demoapp/usr/bin/DemoApp1 (ELF format: ‘elf64-x86-64’; RPATH: ‘’)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/demoapp/usr/bin/DemoApp1 was not linked against libz.so.1 (it uses none of the library’s symbols)
dpkg-shlibdeps: error: cannot continue due to the error above
Note: libraries are not searched in other binary packages that do not have any shlibs or symbols file.
To help dpkg-shlibdeps find private libraries, you might need to use -l.
dh_shlibdeps: dpkg-shlibdeps -Tdebian/demoapp.substvars debian/demoapp/usr/bin/DemoApp1 returned exit code 2
make: * [binary-predeb-IMPL/demoapp] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
debuild: fatal error at line 1364:
dpkg-buildpackage -rfakeroot -D -us -uc failed
When I copy the libquazip.so.1 at the path /usr/lib in my machine then I got the below issue .
dpkg-shlibdeps: error: no dependency information found for /usr/lib/libquazip.so.1 (used by debian/demoapp/usr/bin/DemoApp1)
dh_shlibdeps: dpkg-shlibdeps -Tdebian/demoapp.substvars debian/demoapp/usr/bin/DemoApp1 returned exit code 2
make: * [binary-predeb-IMPL/demoapp] Error 2
dpkg-buildpackage: error: fakeroot debian/rules binary gave error exit status 2
debuild: fatal error at line 1364:
dpkg-buildpackage -rfakeroot -D -us -uc failed
My cmakelist.txt file as per below.
cmake_minimum_required(VERSION 2.8.9)
project(DemoApp1)
set (CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} “;/opt/Qt5.2.1/5.2.1/gcc_64/lib/cmake;”)
find_package(Qt5Widgets REQUIRED)
include_directories(/home/manojpatidar/Manoj/Work/QT_WORK/Linux_Package/demoapp-1.0/lib/quazip-0.5.1/quazip)
link_directories(/home/manojpatidar/Manoj/Work/QT_WORK/Linux_Package/demoapp-1.0/lib/quazip-0.5.1)
add_executable(DemoApp1 main.cpp mainwindow.cpp moc_mainwindow.cpp mainwindow.ui)
target_link_libraries(DemoApp1 quazip z)
install(TARGETS DemoApp1 RUNTIME DESTINATION bin)
qt5_use_modules(DemoApp1 Widgets)
My Debian control file is as per below .
Source: demoapp
Section: games
Priority: extra
Maintainer: Manoj Patidar
Build-Depends: debhelper (>= 8.0.0), cmake, qtbase5-dev, cdbs
Standards-Version: 3.9.4
Package: demoapp
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Description
Description will come here
I think I need to add some dependencies for quazip at the line “Depends: ${shlibs:Depends}, ${misc:Depends}” . Is there anything I have missed ? . Please have look into the issue and let me know where I did wrong.
Thanks