So I've been trying to install an R package called igraph. At the end when it tries to load the package, I get the following error:
/usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /tools/R/2.15.2/lib64/R/library/igraph/libs/igraph.so)
To me this error means that there's the wrong version of libstdc++.so.6. I, however am not using that file. A quick look to my LD_LIBRARY_PATH:
echo $LD_LIBRARY_PATH
/tools/gcc/4.7.0/lib64
In that directory there is a file named libstdc++.so.6 and the following shows that GLIBCXX_3.4.15 is actually there:
strings /tools/gcc/4.7.0/lib64/libstdc++.so.6 | grep GLIB
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.3.2
GLIBCXX_FORCE_NEW
GLIBCXX_DEBUG_MESSAGE_LENGTH
I don't understand why R is being stubborn and not using the file under the gcc directory and keeps trying to reference the /user/lib64 directory. Does anyone any have ideas?
Turns out there's a file under: $RHOME/etc/ called ldpaths that clears the LD_LIBRARY_PATH environment variable for some reason. I reset the LD_LIBRARY_PATH to my preferred paths in that file, relaunched R, and the package installed quite smoothly.
On a side-node: I think this is ridiculous behaviour for such a mature piece of software.
Related
i have install tensorrt
i have already checked python -c "import tensorrt"
but when i compile tensorrt sample
make
it throws out
../../include/NvOnnxParser.h:27:10: fatal error: NvOnnxParserTypedefs.h: No such file or directory
#include "NvOnnxParserTypedefs.h"
i find include file in the dictionary
ls ../../include
the result is
NvCaffeParser.h NvInferPlugin.h NvOnnxParser.h NvUffParser.h
NvInfer.h NvOnnxConfig.h NvOnnxParserRuntime.h NvUtils.h
who can help me?
there maybe some useful resources
https://github.com/NVIDIA/TensorRT/blob/release/6.0/samples/opensource/sampleMNIST/README.md
https://docs.nvidia.com/deeplearning/sdk/tensorrt-sample-support-guide/index.html#mnist_sample
https://docs.nvidia.com/deeplearning/sdk/tensorrt-install-guide/index.html#installing-tar
https://github.com/NVIDIA/TensorRT/tree/release/5.1
https://github.com/onnx/onnx-tensorrt/tree/5.1
https://github.com/NVIDIA/TensorRT/blob/release/6.0/samples/opensource/sampleMNIST/README.md
i fixed this issues
may be your compiler not found the NvOnnxParserTypedefs.h file
try
sudo find / -name NvOnnxParserTypedefs.h
and do the follow script
sudo cp /your/path/to/NvOnnxParserTypedefs.h /your_tensorrt_path/include/
and it may work
I am trying to install an add-on to clean up my PHP called Atom beautify.
Every time I run the plugin to make my PHP file pretty (Atom Beautify) I get this showing up:
Error: spawn EACCES
at exports._errnoException (util.js:1026:11)
at ChildProcess.spawn (internal/child_process.js:313:11)
at exports.spawn (child_process.js:392:9)
at /Users/myusername/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee:349:13
at Promise._execute (/Users/myusername/.atom/packages/atom-beautify/node_modules/bluebird/js/release/debuggability.js:300:9)
at Promise._resolveFromExecutor (/Users/myusername/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:483:18)
at new Promise (/Users/myusername/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:79:10)
at PHPCSFixer.module.exports.Beautifier.spawn (/Users/myusername/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee:346:16)
at /Users/myusername/.atom/packages/atom-beautify/src/beautifiers/beautifier.coffee:308:10
at tryCatcher (/Users/myusername/.atom/packages/atom-beautify/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/Users/myusername/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:512:31)
at Promise._settlePromise (/Users/myusername/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:569:18)
at Promise._settlePromise0 (/Users/myusername/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/Users/myusername/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:693:18)
at Promise._fulfill (/Users/myusername/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:638:18)
at PromiseArray._resolve (/Users/myusername/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise_array.js:126:19)
at PromiseArray._promiseFulfilled (/Users/myusername/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise_array.js:144:14)
at Promise._settlePromise (/Users/myusername/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:574:26)
at Promise._settlePromise0 (/Users/myusername/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:614:10)
at Promise._settlePromises (/Users/myusername/.atom/packages/atom-beautify/node_modules/bluebird/js/release/promise.js:693:18)
at Async._drainQueue (/Users/myusername/.atom/packages/atom-beautify/node_modules/bluebird/js/release/async.js:133:16)
at Async._drainQueues (/Users/myusername/.atom/packages/atom-beautify/node_modules/bluebird/js/release/async.js:143:10)
at Async.drainQueues (/Users/myusername/.atom/packages/atom-beautify/node_modules/bluebird/js/release/async.js:17:14)
I am currently using a Mac computer if that matters at all.
Line 349 of beautifier.coffee is:
cmd = spawn(exe, args, options)
This is where it would make a call to the beautify program. For PHP, that seems to default to php-cs-fixer, as shown in php.coffee:
defaultBeautifier: "PHP-CS-Fixer"
So you probably want to verify that PHP-CS-Fixer is installed and that it is set up properly (the program is readable / executable, preferably in your PATH).
The PHP-CS-Fixer README has installation instructions.
I ran into an odd issue that I cannot fix in any way and I was hoping someone here may have a better understanding of whats wrong;
I am unable to use RWebLogo package - even run the simplest examples due to the same missing Ghostscript error.
e.g. running:
library(RWebLogo)
aln <- c('CCAACCCAA', 'CCAACCCTA', 'AAAGCCTGA', 'TGAACCGGA')
weblogo(seqs=aln, file.out='mylogo.pdf')
Throws this error:
Traceback (most recent call last):
File "/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RWebLogo/extdata/weblogo-3.3/weblogo", line 71, in <module>
weblogolib._cli.main()
File "/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RWebLogo/extdata/weblogo-3.3/weblogolib/_cli.py", line 82, in main
formatter(data, format, opts.fout)
File "/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RWebLogo/extdata/weblogo-3.3/weblogolib/__init__.py", line 757, in pdf_formatter
gs = GhostscriptAPI()
File "/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RWebLogo/extdata/weblogo-3.3/weblogolib/__init__.py", line 196, in __init__
raise EnvironmentError("Could not find Ghostscript on path."
EnvironmentError: Could not find Ghostscript on path. There should be either a gs executable or a gswin32c.exe on your system's path
I have installed ghostscript ver 9.15 with configure/make/install in the terminal and then added the PATH to bash profile and executed it. When I run gs in the terminal it works, confirming it is set to the system path, yet the same error still occurs. Even after rebooting.
I tried adding the gs to the environment in R directly:
Sys.setenv(R_GSCMD = "/Applications/ghostscript-9.15/bin/gs")
which also hasn't helped... Gives exactly the same error. When I search the R environment it shows that gs is there.
Important version information:
MAC: OS Yosemite 10.10.1;
R version 3.1.1 (2014-07-10);
Platform: x86_64-apple-darwin10.8.0 (64-bit);
RWebLogo_1.0.3
Do you know of any issue that may have cause this problem? I'm new to programming, so I am worried I may be missing something basic. I would be grateful for any advice. Thank you!
I have gotten in touch with Omar, the author of RWebLogo, and he has been really helpful in pinpointing my problems and resolving the issue.
First, he advised to run the RWebLogo on a test sequence on the terminal:
/Library/Frameworks/R.framework/Versions/3.1/Resources/library/RWebLogo/extdata/weblogo-3.3/weblogo -f test_seqs.txt -o ~/Desktop/out.pdf -F pdf
Change the base directory (everything before extdata/weblogo …) of the script above to be whatever the command below gives you in R:
system.file(package = 'RWebLogo')
I ran it and got a new error: the lack of numpy. I actually had the numpy installed but without full user privileges. After reinstalling numpy, the RWebLogo was successfully running from the terminal.
Still, the RStudio was throwing a GhostScript error. Omar suggested that there is a problem with an older version of RStudio running on Yosemite (I currently have 10.10.1), and sent me a link to an updated RStudio version where the problem was fixed.
http://www.r-bloggers.com/r-and-rstudio-incompatibility-with-yosemite-mac-os-x-10-10/
I got the updated RStudio and everything works great there right now. Hope this helps someone with a similar issue!
I am using program bedtools and it works perfectly when I am invoking it from my OS (CentOS release 6.4).
I tried to invoke this program using R system and it gave me error:
bedtools: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by bedtools)
My R version is: 3.0.1 (2013-05-16) -- "Good Sport"
How can I solve this problem?
The reason for not being able to run bedtools from within R is that the shell environment is different from the environment outside R. This is a suggestion for how to track down the difference, but since I don't have access to the actual computer it contains a fair amount of guesswork.
It appears that there are multiple versions of libstdc++ (needed to run bedtools) on your system. Run the following command to see which ones you have:
$ locate libstdc++.so
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/libstdc++.so
/usr/lib/gcc/x86_64-redhat-linux/4.4.4/32/libstdc++.so
/usr/lib64/libstdc++.so.6
/usr/lib64/libstdc++.so.6.0.13
Then run the following command on them to see if they differ in versions
$ strings /usr/lib64/libstdc++.so.6 | grep GLIBC
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBC_2.2.5
GLIBC_2.3
GLIBC_2.4
GLIBC_2.3.2
GLIBCXX_FORCE_NEW
GLIBCXX_DEBUG_MESSAGE_LENGTH
If you find GLIBCXX_3.4.15 in one of them, search for its directory among the environment variables outside R to see which it belongs to:
$ set | grep "<path>"
When you find the right environment variable, add the path to it inside R with Sys.setenv as suggested by #morispaa.
Sys.setenv(<VARIABLE> = paste0("<path>:", Sys.getenv("<VARIABLE>"))
Best of luck!
Original answer:
I suspect that you set some environment variable in you .bashrc or similar that points out the library, perhaps you add it to your $PATH?
As a matter of fact, system exectues statements you give it in new shell session, in which your .bashrc and similar config files are not sourced. As an example, I set the variable HISTSIZE=1000 in my .bashrc and I can view it in bash by typing:
~$ echo $HISTSIZE
1000
But if I do the same thing in R I get nothing
> system("echo $HISTSIZE")
On the other hand, if I set it and before echoing it I do get it back (obviously)
> system("export HISTSIZE=1000 && echo $HISTSIZE")
1000
but after the system call is completed it is no longer there if I do another
> system("echo $HISTSIZE")
I am new to the R programming language and am having basic issues with it. I want to untar a file, but it has not been able to work for me.
Here is the code that I enter:
untar("CD_data.tar", exdir="data")
It then returns the following error message:
/bin/sh: /usr/bin/gnutar: No such file or directory
Warning message:
In untar("CD_data.tar", exdir = "data") :
‘/usr/bin/gnutar -xf 'CD_data.tar' -C 'data'’ returned error code 127
Please help! Thanks!
R on OS X 10.9 (Mavericks) seems to set a wrong TAR environment variable.
You can fix this by adding the following to your .Rprofile (or executing it manually):
Sys.setenv(TAR = '/usr/bin/tar')
Alternatively, you can provide the tar path as an argument when calling untar.
My 2 cents is that you are using a mac and have not installed tar. You are getting value 127 because the command is not found within your $PATH and it's not a built-in command (which is usually the case if you were in unix...
In other words you need to install tar.
Or run it in linux.