Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

I try to install minidlna in CentOS 6 but ..

SummerWang
2012-02-24
2013-05-29
  • SummerWang
    SummerWang
    2012-02-24

    $ make
    Compiling minidlna.c
    Compiling upnphttp.c
    Compiling upnpdescgen.c
    Compiling upnpsoap.c
    Compiling upnpreplyparse.c
    Compiling minixml.c
    Compiling getifaddr.c
    Compiling daemonize.c
    Compiling upnpglobalvars.c
    Compiling options.c
    Compiling minissdp.c
    Compiling uuid.c
    Compiling upnpevents.c
    Compiling sql.c
    Compiling utils.c
    Compiling metadata.c
    Compiling scanner.c
    Compiling inotify.c
    Compiling tivo_utils.c
    Compiling tivo_beacon.c
    Compiling tivo_commands.c
    Compiling tagutils/textutils.c
    Compiling tagutils/misc.c
    Compiling tagutils/tagutils.c
    Compiling playlist.c
    Compiling image_utils.c
    Compiling albumart.c
    Compiling log.c
    make: *** No rule to make target `-lavformat', needed by `minidlna'.  Stop.
    $

    I wanna help.

    Thank you so much!

     
  • This one had me stumped for a while as well…

    The answer is the minidlna target in the Makefile at line 67. This includes $(LIBS) which is unnecessary as you've already installed and built the libraries you need. Anyway, with $(LIBS) included in this target, for some reason make on CentOS can't find the ffmpeg libraries (libavformat, libavcodec, etc.) and tries to build those libraries, which is why you get the error.

    The fix is simply to remove $(LIBS) from this target. The target then looks like this:

    minidlna:       $(BASEOBJS) $(LNXOBJS)
            @echo Linking $@
            @$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(BASEOBJS) $(LNXOBJS) $(LIBS)
    

    Jonathan

     
  • SummerWang
    SummerWang
    2012-02-24

    Thank you Jonathan.

    And now the problem comes into "/usr/bin/ld: cannot find -lavformat" after it begins to linking?

    Have anyone met this before?

     
  • What directory do you have libavformat and the other ffmpeg libraries installed in?

     

  • Anonymous
    2012-02-25

    There's not need to modify the makefile.  You need to install

     ffmpeg-devel
    

    from RPMForge.

     
  • SummerWang
    SummerWang
    2012-02-25

    Thank you guys.

    I am a newbie to CentOS, so I transfer to Ubuntu again .

    And It's convinent for me to install minidlna through "sudo apt-get install minidlna" ….

     
  • If all you want to do is run minidlna without making changes to the code, then why not download and  install the 'static' version. This includes the required library code in the binary and works fine on CentOS 6.2.

    Jonathan