Linux

/usr/bin/ld: cannot find -lz

Problem:

/usr/bin/ld: cannot find -lz

Solution:

yum install zlib-static

Problem:

/usr/bin/ld: cannot find -lpthread

Solution:

yum install glibc-static

Problem:

/usr/bin/ld: cannot find -lstdc++

Solution:

yum install libstdc++-static

If you are using RHEL7, these are in the rhel-x86_64-server-optional-7 channel.

Topic: 

Solved: yum says TypeError: coercing to Unicode: need string or buffer, list found

You to run a simple yum update and yum gives you a traceback full of python info. Huh?

up2dateErrors.py212__init__TypeError coercing to Unicode need string or buffer, list found

Traceback (most recent call last)
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 285, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 105, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 228, in getOptionsConfig
    self.conf
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 901, in <lambda>
    conf = property(fget=lambda self self._getConfig(),
  File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 358, in _getConfig
    self.plugins.run('init')
  File "/usr/lib/python2.6/site-packages/yum/plugins.py", line 184, in run
    func(conduitcls(self, self.base, conf, **kwargs))
  File "/usr/share/yum-plugins/rhnplugin.py", line 114, in init_hook
    login_info = up2dateAuth.getLoginInfo()
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 219, in getLoginInfo
    login()
  File "/usr/share/rhn/up2date_client/up2dateAuth.py", line 186, in login
    li = server.up2date.login(systemId)
  File "/usr/share/rhn/up2date_client/rhnserver.py", line 68, in __call__
    raise up2dateErrors.SSLCertificateVerifyFailedError()
  File "/usr/share/rhn/up2date_client/up2dateErrors.py", line 212, in __init__
    f = open(certFile, "r")
TypeError coercing to Unicode need string or buffer, list found

Local variables in innermost frame
up2dateConfig <up2date_client.config.Config instance at 0x2983a70>

What is happening? Has the user been messing around with the python installation and broke it? Maybe there's something wrong with the certificates! After all, it does say SSLCertificateVerifyFailedError() in the abrt output.

No, it's far simpler. Just check your system time by running date. In my case, the local time had been erroneously set to a year earlier. (Note my subtle use of the passive voice here.)

After time was set to a sane value (and ntpd was set to start at boot with chkconfig ntpd on), all was well.

Renewing SAS for Linux at the Command line

sudo /usr/local/SAS/SASFoundation/9.3/sassetup

That gives you this:

Welcome to SAS Setup, the program used to renew your SAS software.

Some conventions used throughout SAS Setup are:
       *   indicates which menu selection is the default choice
     ( )   indicates the default response to a prompt
       !   starts a sub-shell on your system
       h   displays help for a menu selection or prompt
       g   goes back to a previous menu selection or prompt
       q   quits SAS Setup at any point

Setup Utilities Menu
--------------------
* 1.  Renew SAS Software
   -------------------------------
   g: Go back   q: Quit    h: Help
   -------------------------------
Action? (1)

If you continue, you can specify your SETINIT file:

SAS Installation Data (SID) is a text file required to install a customized
version of SAS. The SID was e-mailed to your SAS Installation Representative. If
you would like to receive the SID via e-mail now, please use URL to retrieve it
before continuing the installation.

   http://support.sas.com/adminservices-SID

Specify the file containing SAS Installation Data.
-->/path/to/SAS93_XXXXXX_99999999_LINUX_X86-64.txt

Press return, and hopefully you'll see:

SAS Installation Data retrieved successfully.

_______________________________________________________________________________

Applying SAS Installation Data
Please wait...

SAS Installation Data application is complete.

Reference:

Ubuntu 64, SAS 9.2 & What I DO all Day
Usage Note 10838: When updating the SAS 9 license, "ERROR: 180-322: Statement is not valid or it is used out of proper order" error message appears

Darwin Streaming Server RPM for RHEL6

I wanted to run Darwin Streaming Server on Red Hat Enterprise Linux 6.

I made binary RPMs for 64-bit RHEL6 using these instructions. My changes:

  • fixed the symlink at /var/dss/modules to point to the correct directory
  • worked around the fact that DarwinStreamingServer -x does not exit when run
  • changed config path so that login to the Web Admin is possible

To install on RHEL6 (or CentOS 6, I presume):

yum install perl-Net-SSLeay
rpm -Uh DarwinStreamingServer-6.0.3-4.x86_64.rpm
qtpasswd -c -p yourpassword yourusername

You'll need to open firewall ports:

iptables -A INPUT --protocol tcp --destination $ip --dport 554 -m state --state NEW -j ACCEPT
# Cheesy perl-based web GUI started by /usr/sbin/streamingserver.pl
iptables -A INPUT --protocol tcp --destination $ip --dport 1220 -m state --state NEW -j ACCEPT
# UDP
iptables -A INPUT --protocol udp --destination $ip --dport 6970:6989 -m state --state NEW -j ACCEPT
iptables -A INPUT --protocol tcp --destination $ip --dport 7070 -m state --state NEW -j ACCEPT

You can get to the web admin screen at http://example.com:1220.

Also, Apple seems to be moving toward HTTP Live Streaming and away from Darwin Streaming Server.

References
http://www.howtoforge.com/apples-darwin-streaming-server-on-centos-5.2
http://www.codeproject.com/Articles/41874/Darwin-Streaming-Server-6-0-3-setup-customization
http://git.m2x.eu/git/cgi-bin/gitweb.cgi/?p=DarwinStreamingServer.git;a=summary
http://wiki.alessandrodelgallo.org/index.php/DarwinStreamingServer

Subscribe to RSS - Linux