Today, I tried to do a ‘sudo port selfupdate’ and ‘sudo port upgrade outdated’. I say ‘tried’ because it failed when it tried to upgrade db46:

---> Configuring db46
Error: db46 requires the Java for Mac OS X development headers.
Error: Download the Java Developer Package from: <https://connect.apple.com/cgi-bin/WebObjects/MemberSite.woa/wa/getSoftware?bundleID=20719>
Error: Target org.macports.configure returned: missing Java headers

So I opened that link just to see that I need a developer account to be able to log in and download. On reading the error message the second time, I noticed that it said “missing Java headers”. Searching the web for both this message and a few other keywords like macports and db46, I found the solution: You have to symlink the actual headers directory to another dir (this is not done with the current Java version I guess):

sudo ln -s /Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Headers /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Headers

So I checked for the first directory being there and linked it to the other place. Now db46 built correctly and I can use ffmpeg again \o/

10 Responses to “db46 Java error while trying to install ffmpeg via macports”
  1. chris says:

    Thanks! It totally works!

  2. Daniel says:

    Thanks, you just saved my day!

  3. Arvid says:

    Just wanted to install git-core with mac ports. Same error here.
    That solution above also worked for me. Thanks a lot! =)

  4. UncleBits says:

    Muchas Gracias, amigo! I was about to give up.

  5. Qwentin says:

    Thanx a million! Otherwise my brand new MacBook Pro would have been a useless piece of aluminum…

  6. Andrew H. says:

    Thanks for this tip. I encountered this error while trying to “sudo port install git-core” and making a symlink sure saves a lot of time over having to register as an Apple developer, dig up my credentials, and download some files that I already have!

  7. Roland says:

    Thank you, worked for me.

  8. kira says:

    Thanks a lot,worked for me,you save my day and save my life

  9. Havok says:

    Was just trying to install wine and I ran into the same problem. Your solution worked like a charm, thanks =)

  10.  
Leave a Reply