LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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



Reply
 
Search this Thread
Old 07-02-2010, 01:40 PM   #1
rohedin
LQ Newbie
 
Registered: May 2010
Distribution: Linux Mint 8 - Gnome
Posts: 22

Rep: Reputation: 15
Question CDemu returns error loading shared library libmirage.so.2


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!
 
Old 07-03-2010, 04:18 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,279

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
Not very unusual : The executable 'cdemud'
may be hard coded to look in /usr/lib/ only.

Just create a symlink libmirage.so.2 to /usr/lib/

..
 
Old 07-03-2010, 01:05 PM   #3
rohedin
LQ Newbie
 
Registered: May 2010
Distribution: Linux Mint 8 - Gnome
Posts: 22

Original Poster
Rep: Reputation: 15
Question

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.
Does anyone know how to fix this?

Last edited by rohedin; 07-03-2010 at 01:07 PM.
 
Old 07-04-2010, 06:11 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,279

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
Google
.. Daemon initialization failed: Name request on D-BUS failed ..

http://biodegradablegeek.com/2008/07...x-using-cdemu/
> line 250. ( It's a good tutorial. Suggest: Read it all.)

Please try : sudo cdemud

Did you install the required vhba module ?
May be : sudo modprobe vhba
.....
 
Old 07-05-2010, 11:42 AM   #5
rohedin
LQ Newbie
 
Registered: May 2010
Distribution: Linux Mint 8 - Gnome
Posts: 22

Original Poster
Rep: Reputation: 15
Thumbs up Found something else :)

I actually found an other program, gmount-iso, that works
 
Old 09-02-2010, 01:06 PM   #6
Yiguro
LQ Newbie
 
Registered: Jul 2010
Posts: 2

Rep: Reputation: 0
How I compiled CDemu in fedora 13

______________________________

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.'
    Now, issue this commands (extracted from http://debianforum.de/forum/viewtopic.php?f=34&t=102071)

    Code:
    cd /etc/ld.so.conf.d
    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
    Add the following to your ~/.bash_profile:

    Code:
    export PYTHONPATH=/usr/local/lib/python2.6/site-packages
    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:

        Code:
        cd /etc/rc.d/init.d
        ln -s cdemud ../rc0.d/K41cdemud
        ln -s cdemud ../rc1.d/K41cdemud
        ln -s cdemud ../rc2.d/S41cdemud
        ln -s cdemud ../rc3.d/S41cdemud
        ln -s cdemud ../rc4.d/S41cdemud
        ln -s cdemud ../rc5.d/S41cdemud
        ln -s cdemud ../rc6.d/K41cdemud

    Procedure for (the recommended) session bus:

    • First, create a file named /etc/udev/rules.d/99-vhba.rules containig:
      Code:
      KERNEL=="vhba_ctl", MODE="0660", OWNER="root", GROUP="cdemud"
    • 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.
It happens because you are running cdemud session bus as root. You can only run as root when using system bus. Check mrok quote from http://sourceforge.net/tracker/?func...75&atid=603423

Quote:
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...
Attached Files
File Type: txt cdemud.txt (484 Bytes, 68 views)

Last edited by Yiguro; 10-06-2010 at 05:13 PM. Reason: Added info on how to run session bus
 
  


Reply

Tags
dbus, error, failed, fedora, loading, shared


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error while loading shared library : libpng12.so.0 dhanilshah Linux - Software 5 08-18-2011 08:38 AM
Shared library libfrint.so loading error Jhvdb Linux - Software 8 09-13-2008 11:32 AM
error while loading shared library lucky6969b Programming 2 02-08-2006 01:41 AM
error while loading shared library bonniehandi Linux - Newbie 2 11-19-2005 12:43 AM
kmodule: error while loading shared library libc.so.6 gruell Fedora - Installation 2 08-04-2005 10:24 AM


All times are GMT -5. The time now is 06:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration