Installing r dependencies in Linux system? - linux

I'm trying to install a R package I received from directly from the developer in its *.tar.gz form. But the command:
install.packages("~/Path/to/the/file/package.tar.gz", repos = NULL, type = "source")
gives
Installing package into ‘/home/XXX/R/x86_64-pc-linux-gnu-library/3.2’
(as ‘lib’ is unspecified)
ERROR: dependencies ‘NetIndices’, ‘limSolve’, ‘diagram’ are not available for package ‘package’
* removing ‘/home/XXX/R/x86_64-pc-linux-gnu-library/3.2/package’
Warning in install.packages :
installation of package ‘/home/path/to/the/file/Package/package.tar.gz’ had non-zero exit status
How can I get the dependencies along with the package? I have tried using dependencies=TRUE in install.packages to no avail.

If you're installing a tar.gz you have to install them yourself, or you can try Dirk's littler "little r" which is not an R package, but a Linux tool which among other things provides an install package tool which does what you want. There are Debian and Ubuntu packages.

Since you set repos to NULL dependencies cannot be resolved. Try to install dependencies first:
install.packages(
c("NetIndices", "limSolve", "diagram"),
repos="https://cran.rstudio.com" # or other CRAN mirror
)
and then install source package.

Related

Dependencies error at the time of installing nodejs.rpm using rpm in Centos 7?

I am trying to install nodejs.rpm in Centos 7 using rpm installer. Referred this link. Downloaded rpm binary package from referred link here.
The files downloaded and available in my local directory. Then execute the following command
rpm -ivh nodejs-10.13.0-2.el7.x86_64.rpm
End up in the following error
warning: nodejs-10.13.0-2.el7.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID ac25decd: NOKEY
error: Failed dependencies:
http-parser >= 2.7.0 is needed by nodejs-1:10.13.0-2.el7.x86_64
libcrypto.so.1.1()(64bit) is needed by nodejs-1:10.13.0-2.el7.x86_64
libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) is needed by nodejs-1:10.13.0-2.el7.x86_64
libhttp_parser.so.2()(64bit) is needed by nodejs-1:10.13.0-2.el7.x86_64
libnghttp2.so.14()(64bit) is needed by nodejs-1:10.13.0-2.el7.x86_64
libnghttp2_14_17_1 >= 1.34.0 is needed by nodejs-1:10.13.0-2.el7.x86_64
libssl.so.1.1()(64bit) is needed by nodejs-1:10.13.0-2.el7.x86_64
libssl.so.1.1(OPENSSL_1_1_0)(64bit) is needed by nodejs-1:10.13.0-2.el7.x86_64
libuv >= 1:1.23.2 is needed by nodejs-1:10.13.0-2.el7.x86_64
libuv.so.1()(64bit) is needed by nodejs-1:10.13.0-2.el7.x86_64
npm = 1:6.4.1-1.10.13.0.2.el7 is needed by nodejs-1:10.13.0-2.el7.x86_64
I appreciate any help to resolve this warning and error. Thanks in advance.
You have two options:
downloading yourself all dependencies (painful!) and then installing all of them with rpm -ivh *.rpm
using a decent package manager like yum or dnf that manages all dependencies for you. I would suggest you to try running simply yum install nodejs8 or even yum install ./nodejs-10.13.0-2.el7.x86_64.rpm if you really want to install the exact version that you downloaded.
I used YUM repository to satisfied dependency chain of installing nodejs in centos 7.
When I tried to install using yum command doesn't download all dependencies automatically still few dependency error occurred.
yum install nodejs-10.13.0-2.el7.x86_64.rpm
To resolve this:
Created a directory in a root directory named(A).
Download those few dependencies individually(you can get each rpm file
in google search).
Place all dependencies rpm files along with nodejs rpm in
directory A.
Then run this command to create repodata directory automatically inside A.
createrepo A
Create a repository file named(local.repo) in path /etc/yum.repos.d
[NodeUpgrade]
name=Node Version Upgrade - NodeUpgrade
baseurl=file:///A
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
NodeUpgrade is repository name. This can be listed when execute command
yum repolist
repo id repo name status
NodeUpgrade Node Version Upgrade - NodeUpgrade 7
debuginfo debuginfo 3160
Install using yum:
sudo yum install nodejs
List available nodejs to find nodejs installed and make sure the repo name matches with the one specified in local.repo
yum info nodejs
Installed Packages
Name : nodejs
Arch : x86_64
Epoch : 1
Version : 10.13.0
Release : 2.el7
Size : 27 M
Repo : installed
From repo : NodeUpgrade
Summary : JavaScript runtime
URL : http://nodejs.org/
License : MIT and ASL 2.0 and ISC and BSD
Description : Node.js is a platform built on Chrome's JavaScript
: runtime for easily building fast, scalable network
: applications. Node.js uses an event-driven,
: non-blocking I/O model that makes it lightweight and
: efficient, perfect for data-intensive real-time
: applications that run across distributed devices.
Thanks for your suggestion #Chris Maes. I hope this explanation will bring a clear picture.

Package mesa-filesystem backward compatibility

The software that I am installing requires mesa-dri-filesytem:
This is the screenshot of the installer. I don't want to touch the file. like changing mesa-dri-filesystem to mesa-filesystem
!
but I am currently using Cento OS 7 which finds the package absolute:
I am installing it to an offline server, so yum install won't work, I'm just getting the RPM then doing rpm -ivh [package-name]
Please help me with this
You are getting this error because you have already installed on your system package mesa-filesystem-18.0.5 which obsolete (i.e. replace, supersede) the package mesa-dri-filesystem < 18.0.5. You are trying to install mesa-dri-filesystem-11.0.7 and because 11.0.7 < 18.0.6 then rpm correctly refuse the action as mesa-filesystem.
But the mesa-filesystem at the same time provides mesa-dri-filesystem, e.g., on my system:
# rpm -q --provides mesa-filesystem
mesa-dri-filesystem = 19.0.8-1.fc30
mesa-filesystem = 19.0.8-1.fc30
So if your package requires mesa-dri-filesystem then your requiremens are fulfiled even when mesa-filesystem is installed.

Haskell cabal install wx: missing C library wx_gtk2u_webview-3.0

I am trying to install wx by cabal install wx
Configuring wxc to build against wxWidgets 3.0
setup: Missing dependency on a foreign library:
* Missing C library: wx_gtk2u_webview-3.0
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
cabal: Error: some packages failed to install :
wx-0.92.0.0 depends on wxc-0.92.0.0 which failed to install.
wxc-0.92.0.0 failed during the configure step. The exception was:
ExitFailure 1
wxcore-0.92.0.0 depends on wxc-0.92.0.0 which failed to install.
but I have following files in /usr/lib :
/usr/lib/libwx_gtk2u_webview-3.0.so
/usr/lib/libwx_gtk2u_webview-3.0.so.0
/usr/lib/libwx_gtk2u_webview-3.0.so.0.2.0
I have also tried cabal install --extra-lib-dirs=/usr/lib/ wx but to no avail.
I have also tried all the suggestions in cabal install wx Missing C library
I am on archlinux and I have both wxgtk-3.0 and wxgtk-2.8 multilib and normal versions. I also tried reinstalling them.
I just ran into the same problem on Arch; when I tried running cabal with --verbose=3, it looked like libwx_gtk2u_webview-3.0 was present, but it was complaining about libwebkitgtk-1.0 being missing. After I installed the webkitgtk2 package, which provides libwebkitgtk-1.0, wxHaskell installed with no problems.
Try "sudo apt-get install libwxgtk-webview3.0-dev". It worked for me.

how to backup a installed rpm package in redhat?

I was install a package by rpm command in redhat, but the package is failure now.
I want create a new package from installed package.
what can I do?
This command would help you in that,
rpm -Fvh –repackage rpm-file-name.rpm
Here rpm-file-name.rpm is an existing package in Linux which will be repackage by using above option.
From man page of rpm;
–repackage Re-package the files before erasing.
–replacefiles Install the packages even if they replace files from
other, already installed, packages.
–replacepkgs Install the packages even if some of them are already
installed on this system.
rpmrebuild is built for re-creating RPM package files from already installed packages. There are options which allow you to tailor the packaging, but the most simple invocation just produces an RPM file from an installed package. Example: rpmrebuild coreutils

Haskell cabal install: missing C library iw

I'm running Fedora 19 x64, and
I'm trying to install xmobar via cabal install. After installing a bunch of dependencies, I'm stuck at
cabal: Missing dependency on a foreign library:
* Missing C library: iw
I can't find anything about this iw library and I'm a bit lost at how to continue.
I've got all of the standard c libs installed, as far as I can tell.
sudo yum install glibc-common glibc glibc-devel glibc-headers glibc-utils glibc-devel glib2-devel gcc-c++ gcc
Loaded plugins: auto-update-debuginfo, langpacks, refresh-packagekit
Package glibc-common-2.17-18.fc19.x86_64 already installed and latest version
Package glibc-2.17-18.fc19.x86_64 already installed and latest version
Package glibc-devel-2.17-18.fc19.x86_64 already installed and latest version
Package glibc-headers-2.17-18.fc19.x86_64 already installed and latest version
Package glibc-utils-2.17-18.fc19.x86_64 already installed and latest version
Package glibc-devel-2.17-18.fc19.x86_64 already installed and latest version
Package glib2-devel-2.36.3-3.fc19.x86_64 already installed and latest version
Package gcc-c++-4.8.1-1.fc19.x86_64 already installed and latest version
Package gcc-4.8.1-1.fc19.x86_64 already installed and latest version
Nothing to do
Under Ubuntu the same workaround:
cabal: Missing dependency on a foreign library:
* Missing C library: iw
was resolved though I thought that it can be also two libraries for C language build tools:
liwc : Tools for manipulating C source code
iwyu : Analyze #includes in C and C++ source files
after these additions & libiw-dev library new xmobar was compiled.
Libraries are packaged differently by your OS. For fedora, if you're missing library A, you often will find packages named libA and libA-devel. Luckily, you don't need to guess - instead just ask yum what packages has some file of interest. Below, I asked about the shared object file libiw.so.
yum whatprovides *libiw.so*
...
1:wireless-tools-devel-29-9.1.fc19.x86_64 : Development headers for the
: wireless-tools package
Repo : fedora
Matched from:
Filename : /usr/lib64/libiw.so
1:wireless-tools-29-9.1.fc19.x86_64 : Wireless ethernet configuration tools
Repo : installed
Matched from:
Provides : libiw.so.29()(64bit)
Filename : /lib64/libiw.so.29
I'm surprised Fedora would install without these packages, but if that's the case then obtaining the packages is just a yum install command away.
For anyone trying to install xmobar through cabal on arch,
the missing package that includes iw is called wireless_tools.
You can install that with
pacman -S wireless_tools

Resources