[SOLVED]Problem compiling Astron fork [Ubuntu 14.04]

Hello everyone. My slow notebook was compiling Astron’s Panda3D fork for about 4 and a half hours, but when it’s almost finished, it fails with this traceback, and I have no idea what it means. Any help would be appreciated, thanks.

[ 93%] Generating 'pandac' tree
Traceback (most recent call last):
  File "built/direct/ffi/jGenPyCode.py", line 74, in <module>
    from direct.ffi import DoGenPyCode
  File "/home/littlecat/panda3d/built/direct/ffi/DoGenPyCode.py", line 11, in <module>
    from direct.ffi import FFIConstants
  File "/home/littlecat/panda3d/built/direct/ffi/FFIConstants.py", line 3, in <module>
    from direct.directnotify.DirectNotifyGlobal import *
  File "/home/littlecat/panda3d/built/direct/directnotify/DirectNotifyGlobal.py", line 5, in <module>
    import DirectNotify
  File "/home/littlecat/panda3d/built/direct/directnotify/DirectNotify.py", line 5, in <module>
    import Notifier
  File "/home/littlecat/panda3d/built/direct/directnotify/Notifier.py", line 6, in <module>
    from direct.showbase import PythonUtil
  File "/home/littlecat/panda3d/built/direct/showbase/PythonUtil.py", line 58, in <module>
    from panda3d.core import ConfigVariableBool
ImportError: /usr/lib/python2.7/dist-packages/panda3d/core.so: undefined symbol: libp3audio_moddef
Storing dependency cache.
The following command returned a non-zero value: /usr/bin/python2.7 -B built/direct/ffi/jGenPyCode.py -r panda3d.core panda3d.physics panda3d.fx panda3d.direct panda3d.vision panda3d.skel panda3d.egg panda3d.ode

I solved the problem myself. I’ll be posting how I fixed it here in case someone else have the same issue.

All I did is to delete the “panda3d” directory in “/usr/local/python2.7/dist-packages” and makepanda can generate the tree with no problem.