Sunday, July 5, 2009

Errores con yum

Si te aparecen estos errores:

[root@ibmspmspe01 hmcampos]# yum update
Loaded plugins: fastestmirror, rhnplugin, security
This system is not registered with RHN.
RHN support will be disabled.
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 229, in user_main
errcode = main(args)
File "/usr/share/yum-cli/yummain.py", line 104, in main
result, resultmsgs = base.doCommands()
File "/usr/share/yum-cli/cli.py", line 339, 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 591, in
pkgSack = property(fget=lambda self: self._getSacks(),
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 434, in _getSacks
self.repos.populateSack(which=repos)
File "/usr/lib/python2.4/site-packages/yum/repos.py", line 223, in populateSack
self.doSetup()
File "/usr/lib/python2.4/site-packages/yum/repos.py", line 71, in doSetup
self.ayum.plugins.run('postreposetup')
File "/usr/lib/python2.4/site-packages/yum/plugins.py", line 176, in run
func(conduitcls(self, self.base, conf, **kwargs))
File "/usr/lib/yum-plugins/fastestmirror.py", line 176, in postreposetup_hook
if downgrade_ftp and _len_non_ftp(repo.urls) == 1:
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 585, in
urls = property(fget=lambda self: self._geturls(),
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 582, in _geturls
self._baseurlSetup()
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 538, in _baseurlSetup
mirrorurls.extend(self._getMirrorList())
File "/usr/lib/python2.4/site-packages/yum/yumRepo.py", line 1349, in _getMirrorList
fo = urlgrabber.grabber.urlopen(url, proxies=self.proxy_dict)
File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 612, in urlopen
return default_grabber.urlopen(url, **kwargs)
File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 891, in urlopen
return self._retry(opts, retryfunc, url)
File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 852, in _retry
r = apply(func, (opts,) + args, {})
File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 890, in retryfunc
return URLGrabberFileObject(url, filename=None, opts=opts)
File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 1008, in __init__
self._do_open()
File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 1091, in _do_open
fo, hdr = self._make_request(req, opener)
File "/usr/lib/python2.4/site-packages/urlgrabber/grabber.py", line 1204, in _make_request
fo = opener.open(req)
File "/usr/lib64/python2.4/urllib2.py", line 358, in open
response = self._open(req, data)
File "/usr/lib64/python2.4/urllib2.py", line 376, in _open
'_open', req)
File "/usr/lib64/python2.4/urllib2.py", line 337, in _call_chain
result = func(*args)
File "/usr/lib64/python2.4/urllib2.py", line 573, in
lambda r, proxy=url, type=type, meth=self.proxy_open: \
File "/usr/lib64/python2.4/urllib2.py", line 580, in proxy_open
if '@' in host:
TypeError: iterable argument required



SOLUCION:

Agrega esta linea en /etc/yum.conf:

proxy=http://localhost:3128

Wednesday, June 24, 2009

NTP - no server suitable for synchronization found

If you get this error when configuring NTP:

[root@server ~]# ntpdate -d 192.43.244.18
24 Jun 23:16:10 ntpdate[17897]: ntpdate 4.2.0a@1.1190-r Sat May 5 12:55:37 EDT 2007 (1)
Looking for host 192.43.244.18 and service ntp
host found : 192.43.244.18
transmit(192.43.244.18)
transmit(192.43.244.18)
transmit(192.43.244.18)
transmit(192.43.244.18)
transmit(192.43.244.18)
192.43.244.18: Server dropped: no data
server 192.43.244.18, port 123
stratum 0, precision 0, leap 00, trust 000
refid [192.43.244.18], delay 0.00000, dispersion 64.00000
transmitted 4, in filter 4
reference time: 00000000.00000000 Thu, Feb 7 2036 1:28:16.000
originate timestamp: 00000000.00000000 Thu, Feb 7 2036 1:28:16.000
transmit timestamp: cded788d.d27253da Wed, Jun 24 2009 23:16:13.822
filter delay: 0.00000 0.00000 0.00000 0.00000
0.00000 0.00000 0.00000 0.00000
filter offset: 0.000000 0.000000 0.000000 0.000000
0.000000 0.000000 0.000000 0.000000
delay 0.00000, dispersion 64.00000
offset 0.000000

24 Jun 23:16:14 ntpdate[17897]: no server suitable for synchronization found
[root@server ~]#



SOLUTION: A network device is blocking the communication, trace the packets and find where they are getting blocked.

[root@server ~]# ntpdate -d 192.43.244.18
24 Jun 23:31:15 ntpdate[17926]: ntpdate 4.2.0a@1.1190-r Sat May 5 12:55:37 EDT 2007 (1)
Looking for host 192.43.244.18 and service ntp
host found : 192.43.244.18
transmit(192.43.244.18)
receive(192.43.244.18)
transmit(192.43.244.18)
receive(192.43.244.18)
transmit(192.43.244.18)
receive(192.43.244.18)
transmit(192.43.244.18)
receive(192.43.244.18)
transmit(192.43.244.18)
server 192.43.244.18, port 123
stratum 1, precision -29, leap 00, trust 000
refid [ACTS], delay 0.15309, dispersion 0.00023
transmitted 4, in filter 4
reference time: cded7be0.eeccc6ad Wed, Jun 24 2009 23:30:24.932
originate timestamp: cded7c14.8761f57d Wed, Jun 24 2009 23:31:16.528
transmit timestamp: cded7c14.739e279d Wed, Jun 24 2009 23:31:16.451
filter delay: 0.15407 0.15309 0.15320 0.15765
0.00000 0.00000 0.00000 0.00000
filter offset: 0.010252 0.010024 0.010108 0.011162
0.000000 0.000000 0.000000 0.000000
delay 0.15309, dispersion 0.00023
offset 0.010024

24 Jun 23:31:16 ntpdate[17926]: adjust time server 192.43.244.18 offset 0.010024 sec

Wednesday, June 17, 2009

Failed dependencies with libstdc++.so.5

You get this error:

[root@XXXX]# rpm -ivh TIVsm-API.i386.rpm TIVsm-BA.i386.rpm
error: Failed dependencies:
libstdc++.so.5 is needed by TIVsm-API-5.5.0-4.i586
libstdc++.so.5(CXXABI_1.2) is needed by TIVsm-API-5.5.0-4.i586
libstdc++.so.5(GLIBCPP_3.2) is needed by TIVsm-API-5.5.0-4.i586
libstdc++.so.5(GLIBCPP_3.2.2) is needed by TIVsm-API-5.5.0-4.i586

Solution:
# yum search libstdc

Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
* rpmforge: fr2.rpmfind.net
* base: mirror.unl.edu
* updates: ftp.lug.udel.edu
* centosplus: ftp.usf.edu
* addons: ftp.lug.udel.edu
* extras: ftp.lug.udel.edu
rpmforge | 1.1 kB 00:00
base | 1.1 kB 00:00
updates | 951 B 00:00
centosplus | 951 B 00:00
addons | 951 B 00:00
extras | 1.1 kB 00:00
366 packages excluded due to repository priority protections
=============================================================== Matched: libstdc ================================================================
compat-libstdc++-296.i386 : Compatibility 2.96-RH standard C++ libraries
compat-libstdc++-33.i386 : Compatibility standard C++ libraries
libstdc++.i386 : GNU Standard C++ Library
libstdc++-devel.i386 : Header files and libraries for C++ development
libstdc++43-devel.i386 : Header files and libraries for C++ development

[root@XXXX ~]# yum provides libstdc++
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
* rpmforge: fr2.rpmfind.net
* base: mirror.unl.edu
* updates: ftp.lug.udel.edu
* centosplus: mirror.netglobalis.net
* addons: ftp.lug.udel.edu
* extras: ftp.lug.udel.edu
366 packages excluded due to repository priority protections
libstdc++-4.1.2-44.el5.i386 : GNU Standard C++ Library
Matched from:



libstdc++-4.1.2-44.el5.i386 : GNU Standard C++ Library
Matched from:
Other : Provides-match: libstdc++


[root@XXXX ~]# yum install compat-libstdc++-33
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
* rpmforge: fr2.rpmfind.net
* base: mirror.unl.edu
* updates: mira.sunsite.utk.edu
* centosplus: ftp.usf.edu
* addons: centos.corenetworks.net
* extras: ftp.lug.udel.edu
366 packages excluded due to repository priority protections
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package compat-libstdc++-33.i386 0:3.2.3-61 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================================================================================
Package Arch Version Repository Size
=================================================================================================================================================
Installing:
compat-libstdc++-33 i386 3.2.3-61 base 232 k

Transaction Summary
=================================================================================================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 232 k
Is this ok [y/N]: y
Downloading Packages:
compat-libstdc++-33-3.2.3-61.i386.rpm | 232 kB 00:02
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : compat-libstdc++-33 [1/1]

Installed: compat-libstdc++-33.i386 0:3.2.3-61
Complete!
[root@XXXX ~]#


The problem should be solved. Go on with the install [root@XXXX]# rpm -ivh TIVsm-API.i386.rpm TIVsm-BA.i386.rpm

Saturday, March 1, 2008

Cómo hacer que tu código FLASH valide como XHTML

Agrega tu animación FLASH así:


<p>
<object type="application/x-shockwave-flash" data="/ruta/a/tu_flash.swf" height="200" width="900">
<param name="movie" value="/ruta/a/tu_flash.swf />
<img src="/imagen_a_mostrar_si_visitantes_no_ven_flash.jpg" width="900" height="200" alt="Necesitas Adobe Flash" />
</object>
</p>


Lo vengo usando sin problemas con:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/xhtml1-strict.dtd">


NOTA que el objeto flash debe estar dentro de un elemento block como <p> ;)

Espero te sirva.

Make your Flash websites XHTML compliant

Just add this:


<p>
<object type="application/x-shockwave-flash" data="/path/to/your_flash.swf" height="200" width="900">
<param name="movie" value="/path/to/your_flash.swf />
<img src="/show_this_if_visitor_cant_see_flash.jpg" width="900" height="200" alt="you need flash" />
</object>
</p>


I've been using it with:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/xhtml1-strict.dtd">


NOTE that the flash object must be inside a block element <p> ;)

Hope this helps.

Tuesday, February 12, 2008

Change your IP under Ms.Windows using commands

c:\> netsh interface ip set address name="lan" static 172.16.0.18 255.255.0.0 172.16.0.1 1

I think it's not necessary to explain the sintaxis, just dont forget the "1" at the end.

And check, that network connection is called "lan", if you have "Local area connection" you'll have to change it

;)

Cambiar una IP por comandos en Ms. Windows

c:\> netsh interface ip set address name="lan" static 172.16.0.18 255.255.0.0 172.16.0.1 1

Creo no es necesario explicar la sintaxis, sólo que no te olvides del "1" al final

Y ojo, esa conexión de red se llama "lan", si tienes "Conexión de área local" tendrás que cambiarla.

;)