Showing posts with label Yum. Show all posts
Showing posts with label Yum. Show all posts

RRDTool yum dependencies on CentOS

0 comments

If you are trying to compile RRDTool (at the time of writing, 1.4.5) on CentOS 5.x, you will need install the following packages on yum:
yum install cairo-devel libxml2-devel pango-devel pango libpng-devel freetype freetype-devel libart_lgpl-devel
Then, just compile rrdtool as usual:
wget http://oss.oetiker.ch/rrdtool/pub/rrdtool-1.4.5.tar.gz
tar -xzf rrdtool-1.4.5.tar.gz
cd rrdtool*
./configure --prefix=/opt/rrdtool
make
make install

yum crashing with “thread.error: can’t start new thread”

0 comments
While attempting to install a package on a VPS, I encountered:
root@VPS [/etc/openvpn]# yum install vpn
Loaded plugins: fastestmirror
Determining fastest mirrors
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in ?
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 309, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 178, in main
    result, resultmsgs = base.doCommands()
  File "/usr/share/yum-cli/cli.py", line 345, in doCommands
    self._getTs(needTsRemove)
  File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 101, in _getTs
    self._getTsInfo(remove_only)
  File "/usr/lib/python2.4/site-packages/yum/depsolve.py", line 112, in _getTsInfo
    pkgSack = self.pkgSack
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 661, in <lambda>
    pkgSack = property(fget=lambda self: self._getSacks(),
  File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 501, in _getSacks
    self.repos.populateSack(which=repos)
  File "/usr/lib/python2.4/site-packages/yum/repos.py", line 232, in populateSack
    self.doSetup()
  File "/usr/lib/python2.4/site-packages/yum/repos.py", line 79, in doSetup
    self.ayum.plugins.run('postreposetup')
  File "/usr/lib/python2.4/site-packages/yum/plugins.py", line 179, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/lib/yum-plugins/fastestmirror.py", line 181, in postreposetup_hook
    all_urls = FastestMirror(all_urls).get_mirrorlist()
  File "/usr/lib/yum-plugins/fastestmirror.py", line 333, in get_mirrorlist
    self._poll_mirrors()
  File "/usr/lib/yum-plugins/fastestmirror.py", line 376, in _poll_mirrors
    pollThread.start()
  File "/usr/lib/python2.4/threading.py", line 416, in start
    _start_new_thread(self.__bootstrap, ())
thread.error: can't start new thread

The solution was to disable the fastest mirror plugin by editing /etc/yum/pluginconf.d/fastestmirror.conf:


root@VPS [/etc/openvpn]# cat /etc/yum/pluginconf.d/fastestmirror.conf
[main]
enabled=1
verbose=0
socket_timeout=3
hostfilepath=/var/cache/yum/timedhosts.txt
maxhostfileage=10
maxthreads=15
#exclude=.gov, facebook

root@vpsngnix [/etc/openvpn]# vi  /etc/yum/pluginconf.d/fastestmirror.conf
[main]
enabled=0
verbose=0
socket_timeout=3
hostfilepath=/var/cache/yum/timedhosts.txt
maxhostfileage=10
maxthreads=15
#exclude=.gov, facebook

how to install Yum

48 comments
yum is software installation tool for Red hat linux and Fedora Linux. It is a complete software management system. Other option is to use up2date utility. yum is designed to use over network/internet.

If you don't have yum then download it from project home page yum - Trac

To install fire the command

# rpm -ivh yup*

Step # 1: Configure yum

You need to edit /etc/yum.conf and modify/add following code to it:

vi /etc/yum.conf

Append or edit code as follows:

[base]

name=Fedora Core $releasever - $basearch - Base

baseurl=http://apt.sw.be/fedora/$releasever/en/$basearch/dag

baseurl=http://mirrors.kernel.org/fedora/core/$releasever/$basearch/os

Save the file

Install GPG signature key with rpm command:

# rpm --import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt

and other keys too (if any using above command)

Step # 2 Update your package list:

# yum check-update

Step # 3 start to use yum

Install a new package called foo

# yum install foo

To update packages

# yum update

To update a single package called bar

# yum update bar

To remove a package called telnet

# yum remove telnet

To list all packages

# yum list installed

You can search using grep command

# yum list installed | grep samba

Display information on a package called foo

# yum info foo

To display list of packages for which updates are available

# yum list updates

Problem with yum update

0 comments
Following is the error that occurred :
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
addons | 951 B 00:00
base | 2.1 kB 00:00
extras | 1.1 kB 00:00
updates | 1.9 kB 00:00
Not using downloaded repomd.xml because it is older than what we have:
Current : Tue Feb 9 08:57:23 2010
Downloaded: Tue Jan 26 09:27:44 2010
Excluding Packages in global exclude list
Finished
Setting up Update Process
No Packages marked for Update

Solution :

Run the following two commands :
yum clean all
yum check-update

That should fix the issue.