Installing R on RHEL6 - r

I am unable to install R in RHEL 6.
1)
rpm -ivh epel-release-6-8.noarch.rpm
"package epel-release-6-8.noarch.rpm" is already installed.
2) After running, sudo yum update
sudo yum install R
Loaded plugins: aliases, changelog, kabi, presto, product-id, refresh-packagekit, rhnplugin, search-disabled-repos, security, subscription-manager, tmprepo, verify,
: versionlock
This system is receiving updates from RHN Classic or RHN Satellite.
Loading support for Red Hat kernel ABI
Setting up Install Process
No package R available.
Error: Nothing to do
3) Based on various previous posts, I checked if rhel optional is enabled:
yum repolist all
Loaded plugins: aliases, changelog, kabi, presto, product-id, refresh-packagekit, rhnplugin, search-disabled-repos, security, subscription-manager, tmprepo, verify,
: versionlock
This system is receiving updates from RHN Classic or RHN Satellite.
Loading support for Red Hat kernel ABI
repo id repo name status
rhel-source Red Hat Enterprise Linux 6Server - x86_64 - Source disabled
rhel-source-beta Red Hat Enterprise Linux 6Server Beta - x86_64 - Source disabled
rhel-x86_64-server-6 Red Hat Enterprise Linux Server (v. 6 for 64-bit x86_64) enabled: 18,009
rhel-x86_64-server-extras-6 RHEL Server Extras (v. 6 for 64-bit x86_64) enabled: 51
rhel-x86_64-server-optional-6 RHEL Server Optional (v. 6 64-bit x86_64) enabled: 10,255
Adding one more piece of information - not sure if it is key.
As per the note below, a flag needs to be changed to 1.
https://bluehatrecord.wordpress.com/2014/10/13/installing-r-on-red-hat-enterprise-linux-6-5/
vim /etc/yum.repos.d/redhat.repo
[rhel-6-server-optional-rpms]
...
enabled = 1
However, the file is empty except for a few header statements. Not sure if it being empty is the cause.
Any step that I have missed?

Related

JFrog not showing any 'Debian Info' for package built on Ubuntu Jammy

I am trying to build a custom debian package of the Cassandra C++ Driver on Jammy (22.04) [0].
It builds fine, but when I manually 'Deploy' the packages to our private JFrog repo no information is shown in the 'Debian Info' section, and the packages are not picked up when I do sudo apt update locally.
Locally doing a dpkg-deb -I <package.deb> shows all the expected information. Also, installing the local package with sudo dpkg -i <package.deb> works fine.
All seems fine when I perform the same actions on Ubuntu Bionic (18.04)
There's nothing in the JFrog UI that indicates any issue with the package.
How can I figure out what's going wrong?
[0] https://github.com/datastax/cpp-driver
cd to 'packaging' and run build_deb.sh
Hello I came across the same issue and found out the problem, since ubuntu 21.10 the default package compression method has changed to zstd but artifactory had no support of this until recently: RTFAC-19541.
So you can either update your artifactory instance to at least version 7.38.0 or use another compression method in your debian package generation process, see the this answer.
Too bad that artifactory didn't print any error for this.

How do I install the ODBC driver for Snowflake successfully on an M1 Apple Silicon Mac?

I'm having issues getting the ODBC driver for Snowflake to work on an M1 Apple Silicon Mac running Big Sur.
Successfully following the instructions on Snowflake's website gets me to the point where testing the driver from the command line (using iodbctest) using the DSN results in the following error:
1: SQLDriverConnect = [iODBC][Driver Manager]dlopen(/opt/snowflake/snowflakeodbc/lib/universal/libSnowflake.dylib, 6): no suitable image found. Did find:
/opt/snowflake/snowflakeodbc/lib/universal/libSnowflake.dylib: no matching architecture in universal wrapper
/opt/snowfl (0) SQLSTATE=00000
2: SQLDriverConnect = [iODBC][Driver Manager]Specified driver could not be loaded (0) SQLSTATE=IM003
My Snowflake driver is installed to /opt/snowflake/snowflakeodbc, so that is correct -- I'm suspicious that this is specifically an M1 problem. I'm using the 2.24.1 version of the driver available from the download mirror here, and the path to the driver in /etc/odbcinst.ini is /opt/snowflake/snowflakeodbc/lib/universal/libSnowflake.dylib (which exists and seems, from all my research, that it should be right).
When I run a connection via DBI in R, I get a completely different error:
Error: nanodbc/nanodbc.cpp:1021: 00000:
[Snowflake][ODBC] (11560) Unable to locate SQLGetPrivateProfileString function.
In other StackOverflow posts, people have referenced the above error meaning that there is a missing library of some kind (IODBC isn't configured correctly?), but I've tried quite a few things to no avail. Any guidance would be great.
Tinkered with this a bit more and realized it's an artifact of the installation pathways for the .dmgs & the preset paths in simba.snowflake.ini.
You need to point the Snowflake driver towards the iODBC dylib (as per a sideswiping statement in the docs) -- the driver is originally configured to look for the ODBC dylib (not iODBC) in a folder that's on the path.
When you install the iODBC driver, verify that it is installed to /usr/local/iODBC (this was where my Silicon Mac installed it to) -- and that /usr/local/iODBC/lib has libiodbc.dylib in it. If so, navigate to your installed snowflake driver directory (should be /etc/snowflake) and alter the simba.snowflake.ini file (/etc/snowflake/snowflake/snowflakeodbc/universal/simba.snowflake.ini). You want to uncomment & alter the last line to be both uncommented & point with a full path towards the iODBC dylib (instead of the default, which is the ODBC dylib).
# Darwin specific ODBCInstLib
# iODBC
ODBCInstLib=/usr/local/iODBC/lib/libiodbcinst.dylib
Make sure to comment out any other ODBCInstLib line so that only one is configured. That should enable you to get your connection to snowflake up and running on an M1 Mac.
Big Sur is macOS v11.n
Snowflake supports macOS 10.14 and 10.15 Supported OSs
So what you are trying to do is not supported and is unlikely to work
None of the other solutions worked for me but #kiran-kumawat 's answer set me down a path that worked.
It seems like the core of the issue is that the odbc code is looking for arm64 architecture drivers but Snowflake is providing it in x86_64 architecture. By installing an x86_64 versions of odbc we are able to have it successfully talk to the driver.
First I uninstalled R and Rstudio. (it may be possible to sim-link or change things behind the scenes to make this work with existing installs but I am not sure).
Then install rosetta (apples software for translating between architectures) and a version of homebrew built with it. I am leaving my main version of homebrew in place.
softwareupdate --install-rosetta
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Then use that version of homebrew to install odbc, R, and Rstudio.
arch -x86_64 /usr/local/Homebrew/bin/brew install unixodbc
arch -x86_64 /usr/local/Homebrew/bin/brew install --cask rstudio
arch -x86_64 /usr/local/Homebrew/bin/brew install --cask r
We then need to install the snowflake driver: https://sfc-repo.snowflakecomputing.com/odbc/mac64/latest/index.html
Click through all the install prompts.
Modify your files
/usr/local/etc/odbcinst.ini:
[Snowflake Driver]
Driver = /opt/snowflake/snowflakeodbc/lib/universal/libSnowflake.dylib
/usr/local/etc/odbc.ini
[Snowflake]
Driver = Snowflake Driver
uid = <uid>
server = <server>
role = <role>
warehouse = <warehouse>
authenticator = externalbrowser
We also need to modify the simba.snowflake.ini file.
It is somewhat locked down so run:
sudo chmod 646 /opt/snowflake/snowflakeodbc/lib/universal/simba.snowflake.ini
Then
vim /opt/snowflake/snowflakeodbc/lib/universal/simba.snowflake.ini
And find the ODBCInstLib line that is uncommented and change it to:
ODBCInstLib=/usr/local/Cellar/unixodbc/2.3.9_1/lib/libodbcinst.dylib
After setting this up I was able to use this connection successfully:
install.packages("DBI")
install.packages("odbc")
con <- DBI::dbConnect(odbc::odbc(), "Snowflake")
one of our team member suggested below steps and it worked for us for Apple M1 series
Install the latest snowflake driver
Uninstall m1 based homebrew using cmd
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
Install intel based homebrew - restart terminal when done
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Re-install unixodbc
arch -x86_64 brew install unixodbc
Test
isql -v Pattern
in your database.yml file for connection to snowflake make following change-
replace "dsn: <DSN_NAME>" with following
conn_str: "Driver={PATH};Locale=en-US;uid={USER_NAME};pwd= {PASSWORD};server=<yours>.snowflakecomputing.com;role=<ROLE>;charset=UTF-8;warehouse=<WAREHOUSE>;database=<DATABASE>;schema=<SCHEMA>;"
Has anyone gotten this to work? I use excel w odbc to refresh snowflake files and have tried multiple ways to move the drivers etc and followed snowflake instructions but never works. I did get parallels to work running windows arm but would prefer to just do this in Mac OS
I also have a M1 (version Monterey 12.0) and I ran into similar issues when I tested the driver. Nevertheless, when I tried the "real connection" it worked like a charm. So, maybe it would be good for you to go and test the "real connection" to avoid a wasting of time using such testing. Hope you find this useful.

RStudio installation failure under Debian sid: libgstreamer dependency problems

I use Debian sid (amd64), rolling updates as often as weekly. I downloaded recently the desktop version 0.99.902 of RStudio from their offical site and issued (as root, of course):
dpkg -i rstudio-0.99.902-amd64.deb
to no avail:
dpkg: dependency problems prevent configuration of rstudio:
rstudio depends on libgstreamer0.10-0; however:
Package libgstreamer0.10-0 is not installed.
rstudio depends on libgstreamer-plugins-base0.10-0; however:
Package libgstreamer-plugins-base0.10-0 is not installed.
Newer versions (1.0-0) of these 2 packages are installed on the system, but those older ones (0.10-0) are not available anymore on the official Debian repos.
What should be done to have RStudio installed and fully operational under
Debian sid? I have, of course, installed R debs, from official Debian
repositories, without any issues...
Thanks for any help!
RStudio 1.0.153, released on July 20th 2017, depends on GStreamer 1.0 instead of GStreamer 0.10. It can be installed on modern Debian/Ubuntu without any additional setup, rendering this question and my answer obsolete.
To be more specific, there are two different DEB packages. One is aimed at Ubuntu 16.04 (or later) and Debian 9 (or later), comes only in 64-bit flavor and depends on newer GStreamer 1.0. Another package supports Ubuntu from 12.04 up to 15.10 and Debian 8 and it comes in both 32-bit and 64-bit flavors. This one still depends on older GStreamer 0.10.
Original answer remains below.
As of mid-2016, RStudio has hard dependency on GStreamer 0.10 and there is no way around it. You have to install libgstreamer0.10-0 and libgstreamer-plugins-base0.10-0 to use RStudio.
These packages can be easily pulled in from Debian Jessie (stable). Just add Jessie repository to your sources.list and use apt-pinning to give it lower priority:
# /etc/apt/sources.list:
deb http://httpredir.debian.org/debian jessie main
# /etc/apt/preferences.d/01_release:
Package: *
Pin: release o=Debian,a=unstable
Pin-Priority: 600
Package: *
Pin: release o=Debian,n=jessie
Pin-Priority: 10
Then issue apt-get update and follow up with apt-get install libgstreamer0.10-0 libgstreamer-plugins-base0.10-0.
If you have happened to put RStudio .deb file into local repository, then use apt-get install rstudio and GStreamer0.10 will be pulled in by dependency resolver. This has additional advantage of marking these libraries as automatically installed - they will be subject to automatic removal once RStudio drop them as dependency.
But will that break my system?
No.
Upstream developers designed GStreamer0.10 and GStreamer1.0 as co-installable and able to run at the same time (source). In fact, both were available in Debian repository since September 2012 up to April 2016.
In this pinning setup, packages from Jessie repository will be pulled in only when Jessie is the only provider of requested package. There is no risk of overwriting any package from unstable with older version from stable.
Why does RStudio depend on obsolete library?
Because GStreamer0.10 is the newest version available in both Debian Jessie and Ubuntu 12.04, two distributions they want to support.
RStudio will eventually have to upgrade their dependency to GStreamer1.0, as it will gradually become the only version available. I guess this change may be introduced in spring 2017. First, support for Ubuntu 12.04 will end in April. Rstudio is likely to bump base system requirement to 14.04 - one that has both GStreamer0.10 and 1.0. Second, Debian Stretch - that will have only GStreamer1.0 available - is expected to be released around that time.
I found Miroslaw's answer to be excellent. But, due to the passage of time you will need one more package: libssl1.0.0, so your setup apt-get will look like
apt-get install libgstreamer0.10-0 libgstreamer-plugins-base0.10-0 libssl1.0.0
Download libgstreamer0.10-0 for your machine from any of the mirrors.
Open terminal in the directory where the file is downloaded.
Install it using the command, sudo dpkg -i file.deb. Example sudo dpkg -i libgstreamer0.10-0_0.10.36-1ubuntu1_amd64.deb.
Now open the directory where rstudio.deb is located and install it in the same way.
Download the libraries
http://ftp.br.debian.org/debian/pool/main/g/gstreamer0.10/libgstreamer0.10-0_0.10.36-1.5_amd64.deb
http://ftp.br.debian.org/debian/pool/main/g/gst-plugins-base0.10/libgstreamer-plugins-base0.10-0_0.10.36-2_amd64.deb
Install them with gdebi or dpkg -i and that is it

R travis error: Protocol "https" not supported or disabled in libcurl

I'm trying to test an R package with travis and having troubles with an internal cmake command failing to download from https. In the R package's configure script it downloads and cmake's a metapackage from github. The download and install begin properly but it fails with the following error:
Scanning dependencies of target HDF5
[ 3%] Creating directories for 'HDF5'
[ 3%] Performing download step (download, verify and extract) for 'HDF5'
-- downloading...
src='https://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.15-patch1/src/hdf5-1.8.15-patch1.tar.bz2'
dst='/tmp/minc-toolkit-v2/build/HDF5-prefix/src/hdf5-1.8.15-patch1.tar.bz2'
timeout='none'
CMake Error at HDF5-prefix/src/HDF5-stamp/download-HDF5.cmake:27 (message):
error: downloading
'https://www.hdfgroup.org/ftp/HDF5/releases/hdf5-1.8.15-patch1/src/hdf5-1.8.15-patch1.tar.bz2'
failed
status_code: 1
status_string: "Unsupported protocol"
log: Protocol "https" not supported or disabled in libcurl
Closing connection -1
Prior to this issue I was having problems getting a more recent version of cmake than the 2.xx provided by the travis build machines. My .travis.yml looks like this at the moment:
language: r
sudo: require
cache: packages
addons:
apt:
sources:
- george-edison55-precise-backports # cmake 3.2.3 / doxygen 1.8.3
packages:
- openssl
- libssl-dev
- libcurl4-openssl-dev
- cmake
- cmake-data
repos:
bioCsoft: http://bioconductor.org/packages/3.2/bioc
cran: https://cran.rstudio.com
r_check_args: --install-args="--configure-args=\"--enable-build-minc\""
Any ideas on why this is failing? I can access the URL without issue in a browser and things are downloaded from https urls throughout the build process before this stage.
Newer R versions have https support but that is an issue with building the current R built on the ancient Ubuntu version that Travis prescribes.
You could try to switch from Ubuntu 12.04 to Ubuntu 14.04 by using
sudo: required
dist: trusty
which I do in a few setups (but I also use the first-generation Travis setup which I quite like, still).

RStudio can not use git in Yosemite

After upgrading my Mac to Yosemite, I am not able to use git in RStudio anymore.
(I can still use source tree or git independently from RStudio)
Not sure whether it is related to the PATH issue posted here:
Running system command from R console cannot locate installed programs since upgrading to Mac OSX 10.10
I tried the above solution, but did not work.
In RStudio, I specified the path to Git in Tools/Global Options.../"Git/SVN" correctly (as I used before)
But, in in Tools/Project Options.../"Git/SVN":Version control system the only option left is (None).
RStudio: 0.98.1074 (updated to 0.98.1083, still does not work)
version
_
platform x86_64-apple-darwin10.8.0
arch x86_64
os darwin10.8.0
system x86_64, darwin10.8.0
status
major 3
minor 1.0
year 2014
month 04
day 10
svn rev 65387
language R
version.string R version 3.1.0 (2014-04-10)
nickname Spring Dance
I encountered the same problem. When you enter the directory you used to use with git in your terminal (cd path/to/directory) type git status. In my case I received the message:
Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.
Apparently, I had to agree to the Xcode licence. When you re-run the line with sudo (sudo git status) and enter your password in the terminal you get the whole license displayed. Now you only need to type agree and everything is done. Re-start RStudio and the git functionality is back again.
Best wishes,
Marco

Resources