Linux - Yum Install GCC - Missing Kernel-headers - linux

When ever i try to install GCC on my linux (centos) It comes back with missing
glibc-headers-2.5-58.el5_6.4.x86_64 from updates has depsolving problems --> Missing Dependency: kernel-headers is needed by package glibc-headers-2.5-
58.el5_6.4.x86_64 (updates)
glibc-headers-2.5-58.el5_6.4.x86_64 from updates has depsolving problems
-->
Missing Dependency: kernel-headers >= 2.2.1 is needed by package glibc-headers-2.5- 58.el5_6.4.x86_64 (updates)
Error: Missing Dependency: kernel-headers >= 2.2.1 is needed by package glibc-headers-2.5-58.el5_6.4.x86_64 (updates)
Error: Missing Dependency: kernel-headers is needed by package glibc-headers-2.5-58.el5_6.4.x86_64 (updates)
I try yum install kernel-header & kernel-devel but get back:
No package kernel-headers available.
Any suggestions?

Your system is probably configured to exclude the kernel packages.
try:
sudo vi /etc/yum.conf
then comment (or remove the 'kernel*' part):
#exclude=kernel*
Then you should be able to do:
sudo yum install kernel-headers
Edit: Or, as pointed by Andrew Beals, you can simply run:
yum install kernel-headers --disableexcludes=all

Yes, you could edit the yum.conf file, or you could simply do this:
yum install kernel-headers --disableexcludes=all
Do note that even if your admin is trying to install an excluded package from your RHN Satellite server via the normal process, it will still fail due to the local configuration.
(This holds for RHEL6 / cent6 (centos6) as well, of course.)

I ran into this issue trying to install VMWare Tools. It required gcc and kernel headers -> kernel headers were missing.
So on Redhat 7.4 I had to execute 'yum install kernel-devel'.

try
yum search kernel-headers
gives:
arm-gp2x-linux-kernel-headers.noarch : Kernel headers for Cross Compiling to
: arm-gp2x-linux
kernel-headers.x86_64 : Header files for the Linux kernel for use by glibc

If you installed from Cloudlinux ISO, you can't do anything until you activate your server against a license, it will throw above error on a VPS.

I had the same issue. It seems that I need to install the kernel-devel-xx.rpm (from kernel development package) to my custom kernel:
sudo yum install kernel-devel-xx.rpm
Then you should be able to run:
sudo yum install kernel-devel

Related

How to install kernel-devel and kernel-headers mathching 5.x kernel?

I upgraded Kernel to 5.x referring this blog.
Now, when I run uname -r, the kernal version shows 5.x. However, the kernel-devel and kernel-headers are still 4.x.
What I tried?
Uninstalled kernel-devel and kernel-headers by executing the following commands:
yum remove kernel-devel
yum remove kernel-headers
yum install "kernel-devel-uname-r == $(uname -r)" --> Throws no package found error
yum install "kernel-headers-uname-r == $(uname -r)" --> Throws no package found error
I tried clearing all the 4.x versions of kernel.
After that, when I try to install kernel-devel and kernel-headers again, it still installs version 4.x and not 5.x.
Please advise how to install kernel-devel and kernel-headers mathching 5.x kernel.
You may refer to this article, by execute this command sudo yum --enablerepo=elrepo-kernel install kernel-ml-{devel,headers,perf}

NGINX is giving error when i try to install

I am trying to install nginx in
Amazon Linux AMI
but when i try to run command
sudo yum install nginx
error is below
Loaded plugins: langpacks, priorities, update-motd
Resolving Dependencies
--> Running transaction check
---> Package nginx.x86_64 0:1.14.0-1.el6.ngx will be installed
--> Processing Dependency: libpcre.so.0()(64bit) for package: nginx-1.14.0-1.el6.ngx.x86_64
--> Finished Dependency Resolution
Error: Package: nginx-1.14.0-1.el6.ngx.x86_64 (nginx)
Requires: libpcre.so.0()(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
I had this exact same problem. Check if you have a file like /etc/yum.repos.d/nginx.repo.
The Nginx install instructions tell us to create such a file and that it should look like this:
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/rhel/$releasever/$basearch/
gpgcheck=0
enabled=1
Those instructions also tell us
Due to differences between how CentOS, RHEL, and Scientific Linux populate the $releasever variable, it is necessary to manually replace $releasever with either 5 (for 5.x) or 6 (for 6.x), depending upon your OS version.
So you need to replace $releasever with the appropriate version of your OS. But when using Amazon Linux AMI (or, in my case, the Azure version), it's not easy to tell what this is.
I found that sudo yum install nginx only worked when I replaced $releasever with 7. When I used 6 instead, I got the exact error as you. Hope this helps!
First run $ sudo yum update -y and after that try to install, if still facing same issue then try with $ sudo yum install nginx --skip-broken

dependencies error while installing teamviewer in centOS 6.4 64bit?

Hello I am using centos 6.4 64bit. i am trying to install teamviewer. i've downloaded teamviewer rpm from teamviewer site. when i run
rpm -ivh teamviewer_10.0.37742.i686.rpm
it shows me failed dependencies error so i start to install dependencies by using yum but some dependencies unable to install which are
warning: teamviewer_10.0.37742.i686.rpm: Header V4 DSA/SHA1 Signature, key ID 72db573c: NOKEY
error: Failed dependencies:
libfontconfig.so.1 is needed by teamviewer-10.0.37742-0.i686
libjpeg.so.62 is needed by teamviewer-10.0.37742-0.i686
libXinerama.so.1 is needed by teamviewer-10.0.37742-0.i686
libXrandr.so.2 is needed by teamviewer-10.0.37742-0.i686
libXrender.so.1 is needed by teamviewer-10.0.37742-0.i686
when i run yum install libfontconfig.so.1
i got this error
warning: teamviewer_10.0.37742.i686.rpm: Header V4 DSA/SHA1 Signature, key ID 72db573c: NOKEY
error: Failed dependencies:
libfontconfig.so.1 is needed by teamviewer-10.0.37742-0.i686
libjpeg.so.62 is needed by teamviewer-10.0.37742-0.i686
libXinerama.so.1 is needed by teamviewer-10.0.37742-0.i686
libXrandr.so.2 is needed by teamviewer-10.0.37742-0.i686
libXrender.so.1 is needed by teamviewer-10.0.37742-0.i686
Loaded plugins: fastestmirror, protectbase, refresh-packagekit, security
Loading mirror speeds from cached hostfile
* base: centos.excellmedia.net
* epel: ftp.cuhk.edu.hk
* extras: centos.excellmedia.net
* linuxtech-release: pkgrepo.linuxtech.net
* updates: centos.excellmedia.net
* webtatic: uk.repo.webtatic.com
0 packages excluded due to repository protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package fontconfig.i686 0:2.8.0-5.el6 will be installed
--> Processing Dependency: libexpat.so.1 for package: fontconfig-2.8.0-5.el6.i686
--> Running transaction check
---> Package expat.i686 0:2.0.1-11.el6_2 will be installed
--> Finished Dependency Resolution
Error: Multilib version problems found. This often means that the root
cause is something else and multilib version checking is just
pointing out that there is a problem. Eg.:
1. You have an upgrade for fontconfig which is missing some
dependency that another package requires. Yum is trying to
solve this by installing an older version of fontconfig of the
different architecture. If you exclude the bad architecture
yum will tell you what the root cause is (which package
requires what). You can try redoing the upgrade with
--exclude fontconfig.otherarch ... this should give you an error
message showing the root cause of the problem.
2. You have multiple architectures of fontconfig installed, but
yum can only see an upgrade for one of those arcitectures.
If you don't want/need both architectures anymore then you
can remove the one with the missing update and everything
will work.
3. You have duplicate versions of fontconfig installed already.
You can use "yum check" to get yum show these errors.
...you can also use --setopt=protected_multilib=false to remove
this checking, however this is almost never the correct thing to
do as something else is very likely to go wrong (often causing
much more problems).
Protected multilib versions: fontconfig-2.8.0-5.el6.i686 != fontconfig-2.8.0-3.el6.x86_64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
so what should i do i've tried many things but didn't success?
On
# uname -a
Linux centos6.6.6.71092 2.6.32-042stab108.1 #1 SMP Thu Apr 23 19:17:11 MSK 2015 x86_64 x86_64 x86_64 GNU/Linux
This works for me without errors:
# wget http://www.teamviewer.com/download/teamviewer_linux.rpm
# yum install teamviewer_linux.rpm
If you get missing public key error, you can download public key and
import it using the following command continue
TeamViewer for Linux is compiled on x86 (i686) platform, so you must install x86-based dependency packages, which you can find at rpmfind.net.
TeamViewer for Linux (OpenSuse, CentOS etc..) is compiled on x86 platform, so you have to install x86-based dependency packages

cabal install fails because missing C library

I want to install hemokit driver by the command cabal install hemokit command, but it's tells me that it fails when it's going to install the dependency 'hidapi'. And this is the message, which gives to me
`Configuring hidapi-0.1.3...
cabal: Missing dependency on a foreign library:
* Missing C library: udev
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.
Failed to install hidapi-0.1.3
then I run the command sudo apt-get install udev to install udev package, but the problem didn't solved!
The udev library is a critical component of Ubuntu. What's missing are the development headers. Try running sudo apt-get install libudev-dev first and then installing hemokit.

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.

Resources