How to install yum on centos - linux

I removed /usr/bin/yum by mistake.
How to re install yum on centos6
Please help me ;(
I followed website explanation
but I got this error Failed dependencies: blah,blah
or yum-2.2.1-1.centos4.noarch.rpm: Header V3 DSA/SHA1 Signature, key ID ###: NOKEY
ps. I try this
wget http://mirrors.163.com/centos/6/os/x86_64/Packages/python-iniparse-0.3.1-2.1.el6.noarch.rpm
and rpm -ivH yum-3.2.29-60.el6.centos.noarch.rpm
then I got this error
Failed dependencies:
/usr/bin/python is needed by yum-3.2.29-60.el6.centos.noarch
python >= 2.4 is needed by yum-3.2.29-60.el6.centos.noarch
python(abi) = 2.6 is needed by yum-3.2.29-60.el6.centos.noarch
python-sqlite is needed by yum-3.2.29-60.el6.centos.noarch
so I copied old version yum
and This error what i got
-bash: /usr/bin/yum: /usr/bin/python2.6: bad interpreter: no such file or directory
(I upgraded python2.6 to python2.7)

Is aptitude or apt-get available on the machine?
apt-get install yum
Or have a look here:
http://openvz.org/Install_yum

Related

pcap library not found error when trying to install reaver on linux fedora

I use a Linux Fedora 27 machine and I would like to install reaver-1.4. I have the same problem as described here: error pcap library not found but I tried both commands: sudo yum install sqlite-devel and sudo yum install sqlite3 libsqlite3-dev libpcap0.8-dev and nothing works. With the first command nothing seems to change and with second I get the following message:
No match for argument: sqlite3
No match for argument: libsqlite3-dev
No match for argument: libpcap0.8-dev
Error: Unable to find a match
You generally can't expect packages to be named the same thing in Debian and Fedora, so just swapping in yum with the same package names is unlikely to work. Try:
sudo yum install libpcap-devel
I note that Fedora has version 1.8 instead of version 0.8; hopefully that will not be a problem.

Warning libstdc++-devel-4.4.4-13.el6.x86_64.rpm

im getting this error when trying to installing this rpm into the kernel server of 64bit.
The error is as the log below:
rpm -ivh libstdc++-devel-4.4.4-13.el6.x86_64.rpm
warning: libstdc++-devel-4.4.4-13.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 192a7d7d: NOKEY
error: Failed dependencies:
libstdc++(x86-64) = 4.4.4-13.el6 is needed by libstdc++-devel-4.4.4-13.el6.x86_64
Any suggestions would be appreciated. Thanks..
You can only install a RPM after you have installed all its dependencies.
To install this RPM first you need to install libstdc++-4.4.4-13.el6.x86_64.rpm
You can do this in two ways .
Method 1 :
Download and install libstdc++-4.4.4-13.el6.x86_64.rpm first and then libstdc++-devel afterwards.
wget ftp://ftp.pbone.net/mirror/ftp.scientificlinux.org/linux/scientific/6.0/x86_64/os/Packages/libstdc++-4.4.4-13.el6.x86_64.rpm
rpm -ivh libstdc++-4.4.4-13.el6.x86_64.rpm
rpm -ivh libstdc++-4.4.4-13.el6.x86_64.rpm
Method 2 :
You can use yum to automatically resolve and install dependencies for you
yum localinstall libstdc++-devel-4.4.4-13.el6.x86_64.rpm
If that doesn't work, try
yum install libstdc++-devel

install.packages("devtools") on R 3.0.2 fails in Ubuntu 14.04

I am trying to install the R 3.0.2 devtools package on Ubuntu 14.04 as follows:
install.packages("devtools")
I get the following results:
Installing package into ‘/home/jim/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
Warning: dependency ‘xml2’ is not available
also installing the dependency ‘rversions’
trying URL 'http://cran.rstudio.com/src/contrib/rversions_1.0.1.tar.gz'
Content type 'application/x-gzip' length 4624 bytes
opened URL
==================================================
downloaded 4624 bytes
trying URL 'http://cran.rstudio.com/src/contrib/devtools_1.8.0.tar.gz'
Content type 'application/x-gzip' length 141487 bytes (138 Kb)
opened URL
==================================================
downloaded 138 Kb
ERROR: dependency ‘xml2’ is not available for package ‘rversions’
* removing ‘/home/jim/R/x86_64-pc-linux-gnu-library/3.0/rversions’
ERROR: dependency ‘rversions’ is not available for package ‘devtools’
* removing ‘/home/jim/R/x86_64-pc-linux-gnu-library/3.0/devtools’
The downloaded source packages are in
‘/tmp/RtmpmDzsRJ/downloaded_packages’
Warning messages:
1: In install.packages("devtools") :
installation of package ‘rversions’ had non-zero exit status
2: In install.packages("devtools") :
installation of package ‘devtools’ had non-zero exit status
It appears there is a dependency on a package named xml2. Does anyone know where I can find this package and how I can install it.
I have already installed the following:
sudo apt-get install libxml2-dev
sudo apt-get install libcurl4-openssl-dev
sudo apt-get install libcurl4-gnutls-dev
sudo apt-get install curl
If R is installed in Ubuntu using the software center, the stable version at the time of the Ubuntu build is built is included. Hence R 3.0.2 is installed.
Adding the following to /etc/apt/sources.list:
deb http://cran.rstudio.com/bin/linux/ubuntu trusty/
resulted in the current version (R 3.2.0) being loaded.
I had to install the following OpenSSL library
sudo apt-get install libssl-dev
and then I was able to start R and successfully install 'devtools'
Many thanks to Dirk and Pascal for their advice.
Another solution (on version R 3.2.2) is to installing lxml:
$ apt-get install libxml2-dev libxslt-dev
which successfully removed the R error:
Error: configuration failed for package ‘xml2’
appearing in R when running
install.packages("devtools")

xz compression install on centos

Any installation or update using yum command I ended up error: Error: xz compression not available. On website I read that Python library is missing. When you try to install a library (sudo yum update pyliblzma) again failed with error. Do not know how? Thanks.
This problem comes if you installed a wrong epel release on your machine. If so, then you need to remove the epel release by
yum remove epel-release
Sometimes that is not enough, you need to remove the cache as well by:
rm -rf /var/cache/yum/x86_64/6/epel
Then you can install the epel-release again
yum -y install epel-release
You need install the EPEL repository by downloading the appropriate RPM package for your system and installing it. For example, for CentOS and Red Hat Enterprise Linux 6.x:
wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh epel-release-6*.rpm
If you get a File Not Found error message when trying to download the package, the version number might have changed. You can access the latest version of the RPM installer from the Fedora EPEL wiki page. The wiki page also includes additional instructions for Red Hat Network subscribers who are installing the EPEL repository.
Finally, install the Python library:
yum install pyliblzma
This works perfecly in my CentOS 6.x.
I've found a solution on this page of stackexchange, working in CentOS 6.X:
https://unix.stackexchange.com/a/314756
sudo rpm -e epel-release-7-5.noarch
wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -ivh epel-release-6-8.noarch.rpm
sudo yum clean all
sudo rpmdb -v --rebuilddb
sudo yum -y install libselinux-python
I was also suffering from this issue..
If you are installing packages but it is already available on your system.
Remove existing packages and then try to install new.
It will work properly...
I was able to solve this problem by installing pyliblzma using rpm instead of yum as yum is not working.
Find pyliblzma rpm package according to your architecture and install it using the command.
rpm -Uvh pyliblzma-version-release.architecture.rpm
I used the following command to install pyliblzma for my 64 bit Redhat 6.8 machine. Please check URL in the command and make changes accordingly.
rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/pyliblzma-0.5.3-3.el6.x86_64.rpm
In my case the issue was caused by missing modules in python's site-packages directory. Here's what I did:
$ rpm -Va
to get a list of all files belonging to all rpms that do not verify. I got a bunch of messages about missing modules:
missing /usr/lib64/python2.7/site-packages/...
Luckily, I had an identical CentOS version elsewhere with all these packages present, so I just copied them over and ran
$ rpmdb -v --rebuilddb
to rebuild rpm database.

Error: gdal-config not found while installing R dependent packages whereas gdal is installed

Please point out the point that I am missing:
openSUSE 11.3
xx#linux-y3pi:~/Desktop/R> sudo R CMD INSTALL rgdal_0.7-12.tar.gz
root's password:
* installing to library ‘/usr/lib64/R/library’
* installing *source* package ‘rgdal’ ...
** package ‘rgdal’ successfully unpacked and MD5 sums checked
configure: gdal-config: gdal-config
checking gdal-config usability... ./configure: line 1353: gdal-config: command not found
no
Error: gdal-config not found
The gdal-config script distributed with GDAL could not be found.
If you have not installed the GDAL libraries, you can
download the source from http://www.gdal.org/
If you have installed the GDAL libraries, then make sure that
gdal-config is in your path. Try typing gdal-config at a
shell prompt and see if it runs. If not, use:
--configure-args='--with-gdal-config=/usr/local/bin/gdal-config'
with appropriate values for your installation.
ERROR: configuration failed for package ‘rgdal’
* removing ‘/usr/lib64/R/library/rgdal’
xx#linux-y3pi:~/Desktop/R> whereis gdal-config
gdal-config: /usr/local/bin/gdal-config
xx#linux-y3pi:~/Desktop/R> gdal-config
Usage: gdal-config [OPTIONS]
Options:
[--prefix[=DIR]]
[--libs]
[--dep-libs]
[--cflags]
[--datadir]
[--version]
[--ogr-enabled]
[--formats]
xx#linux-y3pi:~/Desktop/R>
> sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=C LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
>
xx#linux-y3pi:~/Desktop/R> gdal-config --version
1.9.0
xx#linux-y3pi:~/Desktop/R> proj
Rel. 4.8.0, 6 March 2012
usage: proj [ -beEfiIlormsStTvVwW [args] ] [ +opts[=arg] ] [ files ]
linux-y3pi:~ # $PATH
bash: /home/xx/qtsdk-2010.05/qt/bin/:/home/xx/qtsdk-2010.05/bin:/home/xx/qtsdk-2010.05/qt/bin:/home/xx/qtsdk-2010.05/qt/bin/:/home/xx/qtsdk-2010.05/bin:/usr/lib64/mpi/gcc/openmpi/bin:/home/xx/bin:/usr/local/bin:/usr/bin:/sbin:/usr/sbin:/bin:/usr/bin/X11:/usr/X11R6/bin:/usr/games: No such file or directory
In Ubuntu 18.04
I fixed this by sudo apt install libgdal-dev
Hope someone find this helpful. Some above answers seems to be outdated and lengthy.
In earlier versions (which had apt-get)
sudo apt-get install libgdal-dev
You need the -dev package with headers and shared library links for development besides the normal package for deployment. Two different use cases as far as the distro is concerned.
On my distribution:
edd#max:/tmp$ dpkg -l | grep gdal | cut -c-72
ii libgdal1-1.7.0 1.7.3-6ubuntu3
ii libgdal1-dev 1.7.3-6ubuntu3
edd#max:/tmp$
and R CMD INSTALL rgdal_0.7-8.tar.gz works just fine as you would expect from a CRAN package given all the build-time checks at CRAN.
Update late 2016: As #JoshO'Brien points out in the comment
Minor update: Here in 2016, running Ubuntu 14.04.2, libgdal1h seems to
have replaced libgdal1(though libgdal1-dev is still needed). At least
I get an error to that effect when I attempted to apt-get install libgdal1
For Ubuntu 16.04 the corresponding line would be
sudo apt-get install libgdal1i
Such renaming of upstream libraries is common; something such as apt-cache search libgdal can help locate the current package names. The important key though is that the "abstract" development package libgdal-dev is all that is needed to build as it pulls the "concrete" current run-time package (here: libgdal1i) in via a dependency.
You can use apt-file package, to find which package contains the missing file you are looking for.
First install the apt-file using the command apt-get install apt-file Update apt-file using the command apt-file update Now you can use apt-file to find the missing file. apt-file search gdal-config
For my case, I got the same error when configuring grass-7.1 from svn. As shown below:
$ ./configure
...more...
checking whether to use GDAL... yes
checking for gdal-config... /usr/bin/gdal-config
...more....
./configure: 1: ./configure: /usr/bin/gdal-config: not found
./configure: 6093: test: =: unexpected operator
configure: error: *** Unable to locate GDAL library.
But, after looking for gdal-config file with apt-file as shown below, I was able to resolve the error, after installing the package libgdal1-dev
$ apt-file search gdal-config
Results
libgdal1-dev: /usr/bin/gdal-config
So I installed libgdal1-dev, as shown below:
$ sudo apt-get install libgdal1-dev
This happens because the configuration failed for package ‘rgdal’
so we have to install necessary dependencies.
The packages libgdal-dev and libproj-dev are required:
sudo apt-get install gdal-bin proj-bin libgdal-dev libproj-dev
Then install rgdal by
install.packages("rgdal")
Load rgdal by
library(rgdal)
On macOS
brew install gdal
removed the error
gdal-config not found
Try this on CentOS 6
sudo yum install gdal gdal-python gdal-devel mapserver mapserver-python libxml2 libxml2-python python-lxml python-pip python-devel gcc
Read the reference manual.
SystemRequirements for building from source: GDAL >= 1.6.0 library
from http://trac.osgeo.org/gdal/wiki/DownloadSource and PROJ.4 (proj
>= 4.4.9) from http://trac.osgeo.org/proj/;
The same problem occurred today to me on a Linux CentOS 6.10 on which I do not have administration rights.
What I did:
a) Create a conda environment dedicated to my R version
conda create --name MYR
b) Activate the environment
source activate MYR
c) Install R
conda install -c conda-forge r-base
d) Install libgdal
conda install -c conda-forge libgdal
This solved the problem for me. My R version was 4.1.3. I guess other versions should work.
For manjora or archlinux, just try:
yay -S gdal

Resources