Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I have downloaded CDemu from http://sourceforge.net/projects/cdemu/ and installed it without errors. However when I go to /usr/local/bin and run ./cdemud it returns the following error,
Quote:
ben@Scottie /usr/local/bin $ ./cdemud
./cdemud: error while loading shared libraries: libmirage.so.2: cannot open shared object file: No such file or directory
I find this confusing as I have installed libmirage - http://sourceforge.net/projects/cdem...r.bz2/download - and I have found libmirage.so.2 in /usr/local/lib.
Am I doing anything wrong? Does anyone know how I can fix it?
Thanx in advance for any help on this problem!
Thanx for the reply
I have done what you sugested but it comes up with a new error,
Quote:
Scottie bin # ./cd*
Starting daemon in local mode with following parameters:
- num devices: 1
- ctl device: /dev/vhba_ctl
- audio driver: null
- bus type: system
cdemud: Daemon: failed to request name on system bus!
Daemon initialization failed: Name request on D-BUS failed.
EDIT: I've added info on how to run on session bus, something that I couldn't get to work until now.
______________________________
I've tried this in fedora 13 64 bit, but it should also work for 32 bit. Everything installs to /usr/local, except gCDemu, which is installed to /usr.
Compiling
RUN EVERYTHING AS ROOT
libmirage
Code:
Dependencies: yum install glib2-devel libsndfile-devel zlib-devel
Install: ./configure && make && make install
vhba
Code:
Install: make && make install
cdemu-daemon
Code:
Dependencies: yum install dbus-devel dbus-glib-devel libao-devel libdaemon-devel
Install: PKG_CONFIG_PATH=/usr/local/lib/pkgconfig ./configure --sysconfdir=/etc && make && make install
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig tells it to look for libmirage libraries in /usr/local/lib, not /usr/lib. The --sysconfdir=/etc is necessary, because according to the README file:
Quote:
...due to the way autotools are used, /etc gets
prefixed and therefore config file ends up installed into ${prefix}/etc/. To
avoid this, you should pass --sysconfdir=/etc to configure, regardless of the
prefix you are passing to configure.
If you didn't do this, you would get your second error:
Code:
'cdemud: cdemud_daemon_initialize: failed to get name on system bus!
Daemon initialization failed: Name request on D-BUS failed.'
create file named usr-local-lib.conf (or whatever name you like) containing:
Code:
/usr/local/lib
and finally, run
Code:
ldconfig
These commands avoid the first error you got:
Code:
"./cdemud: error while loading shared libraries: libmirage.so.3: cannot open shared object file: No such file or directory"
NOTE: (my library is libmirage.so.3 instead of libmirage.so.2 because I'm using a newer version on CDemu).knudfl suggested to add a symbolic link in /usr/bin pointing to /usr/local/lib/ligmirage.so.3. While that works, it's better to do what we've done here.
cdemu-client
Code:
Dependencies: yum install intltool pygtk2-devel
Install: ./configure && make && make install
If you didn't do this, you would get another error:
Code:
[root@power-sylvia cdemu-client-1.1.0]# cdemu
Traceback (most recent call last):
File "/usr/local/bin/cdemu", line 23, in <module>
import cdemu, cdemu.cdemu
ImportError: No module named cdemu
gcdemu
Code:
Install: ./configure --prefix=/usr && make && make install
The --prefix=/usr thing is because Gnome looks for its panel applets in /usr.
Now, log out and log in
Right click on menu, Add to panel... -> gCDEmu Applet (an applet for controlling cdemu devices). Right click on the gcdemu applet. If you check "Use system bus" gCDemu listens for cdemu-daemon on the system bus, otherwise, it listens on the session bus. In the next section "How to start CDemu at boot" there's more information about it.
How to start CDemu at boot:
Load vhba module at boot
Create a file named /etc/sysconfig/modules/vhba.modules containing:
Code:
modprobe vhba
Now, you have to decide whether you want to run cdemu-daemon in system bus (daemonized) or session bus (executed as a regular command in a startup script). CDemu 1.3.0 recommends session bus because it's more secure.
Procedure for system bus:
Add init script
Create file /etc/rc.d/init.d/cdemud containing the file I've attached (remove the .txt extension)
Add execute permissions to the file you just created:
Code:
chmod ugo+x cdemud
By the way, the start priority for this script is the lowest possible (99). This is because if its priority is very high, /etc/sysconfig/modules/vhba.modules gets loaded after it (should be before, it's a "race condition"), causing an error at the boot sequence:
Code:
Starting CDemud: Failed to start daemon (1).
If this happens, gCDemu applet will appear greyed out.
However, with priority 99 everything starts fine:
Code:
Starting CDemud: Daemon successfully started.
Make the script start at every boot. There are several options:
Using Fedora/Red Hat's chkconfig (recommended for Fedora):
Code:
chkconfig --add cdemud
If you're not using Fedora, it would be a different command (e.g update-rc.d in Debian) and modify script startup # accordingly
Manually adding symbolic links to rcX.d. Add SXXcdemud and KXXcdemud symbolic links, where XX is any free number available, in my case I've used 41:
Add "cdemud" group. You can do it from Gnome's GUI or using command line:
Code:
# groupadd cdemud
# usermod -a -G cdemud your_username
Finally, add the following to your ~/.bash_profile:
Code:
/usr/local/bin/cdemud --bus=session &
If gCDemu appears greyed out, check whether you're using system or session bus, then right click the gcdemu applet and check/unckeck "Use system bus" accordingly. If it's checked it'll use system bus, otherwise, it'll employ session bus.
_________________________________________
If you arrived here finding info for this error:
Code:
[root@fedora standard]# cdemud --bus=session
Starting daemon in local mode with following parameters:
- num devices: 1
- ctl device: /dev/vhba_ctl
- audio driver: null
- bus type: session
cdemud: Daemon: failed to get session bus!
Daemon initialization failed: Failed to connect to D-BUS bus.
mrok said:
If you use session bus, you should run the daemon as the user
instead of root. Each user has their own session bus, which is inaccessible
by other users; therefore CDEmu instance ran on session bus as root won't
be accessible by other users...
Last edited by Yiguro; 10-06-2010 at 04:13 PM.
Reason: Added info on how to run session bus
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.