Linux

General Linux questions

sudo without tty

in

Running a privileged command requires sudo. If it is performed from under apache, sudo says that it requires tty. To fix it, run visudo and comment out a string in /etc/sudoers

 #Defaults requiretty

or override its value for apache

 Defaults:apache !requiretty

clear-type on centos5

I have pre-built RPMs for CentOS 5, so for this OS just attach to the vitki.net repository and install RPMs:

rpm -i vitki-net-release-5-3.el5.noarch.rpm
yum install freetype cairo libXft
yum install gedit gedit-plugins

Otherwise, you have to compile yourself.

Get the patches from http://quanli.googlepages.com/davidt...esfordebiansid (or google for "david turner subpixel"):Read more

configure java alternatives

in
 $ java -version
gij (GNU libgcj) version 4.1.2 20080704 (Red Hat 4.1.2-44)
$ alternatives --install /usr/bin/java java /usr/java/jre1.6.0_14/bin/java 2
$ alternatives --config java
There are 2 programs which provide 'java'.
Selection Command
-----------------------------------------------
*+ 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java
2 /opt/jdk1.6.0_07/bin/java
Enter to keep the current selection[+], or type selection number: 2
$ java -version
Java HotSpot(TM) Client VM (build 14.0-b16, mixed mode, sharing)

rpm MD5 sum mismatch

in

While running

 rpm -ihv *.rpm

you get the error message

 cpio: MD5 sum mismatch on rpms ...

How to fix:

 rpm --nomd5 -ihv *.rpm

yum force reinstall

in

Since Yum does not have a force flag, rpm commands must be used along with Yum to do some heavy lifting. Here are a few ways to force the reinstall of a broken package on a Yum Managed system.
Yum Remove and then Install.The easiest solution is to yum remove the package and then yum install the same package. If there are too many dependencies at stake with the package in question, try another method.

 yum remove PACKAGE
yum install PACKAGE

Force Erase and then Yum Install.RPM dependencies sometimes make a simple yum remove impossible and Yum will want to erase your entire OS before moving on. In this case, use rpm to force erase, then yum to install.Read more

ld: cannot find -lltdl

in

When I build a package, linking fails with

/usr/bin/ld: cannot find -lltdl
collect2: ld returned 1 exit status

This happens because a symbolic link is absent

/usr/lib/libltdl.so -> /usr/lib/libltdl.so.7.x

This is solved by

yum install libtool-ltdl-devel

Initial setup of centos 5

in

Update OS:

yum -y update

Enable the DAG repository:

rpm –import http://dag.wieers.com/rpm/packages/RPM-GPG-KEY.dag.txt
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.3.6-1.el5.rf.i...
rpm -i rpmforge-release-0.3.6-1.el5.rf.i386.rpm
yum update

qip infium on linux

in

First of all, consider qutIM (fc11 repo).

For smileys to work, obtain oleaut32.dll from windows and copy into ~/.wine/dosdevices/c:/windows/system32/.

Run winecfg and open "libraries" tab. Choose existing oleaut32.dll or insert this item manually, edit it and select "Native (Windows)".

To avoid choppy sound, run winecfg and open "sound" tab. Choose ALSA adn set hardware acceleration to "Emulation".

Install qipinfium9030.exe into ~/.wine/dosdevices/c:/.Read more

qip 2005 on linux

in

Download Mozilla ActiveX Control 1.7.12.Install it and copy all DLLs into /system32. If animated smileys don't work, run qip with argument /oldgif

wine "~/qip.exe" /oldgif

Complete run line:

env WINEPREFIX="~/.wine" wine "C:\Program Files\QIP\qip.exe" /oldgif

extending selinux targeted policy

in

From here (via here)

cat /var/log/audit/audit.log | audit2allow -m local > local.te
vim local.te
checkmodule -M -m -o local.mod local.te
semodule_package -o local.pp -m local.mod
semodule -i local.pp
Syndicate content