dynamic libraries not enabled; check your Lua installation

[plain] view plain copy
  1. [:1000001] LAUNCH logger   
  2. [:1000003] LAUNCH gate L ! 0.0.0.0:2013 5 256 0  
  3. [:1000002] LAUNCH master 0.0.0.0:2013  
  4. [:1000004] Harbor(0) connect to 127.0.0.1:2013  
  5. [:1000005] LAUNCH gate L ! 127.0.0.1:2526 5 256 0  
  6. [:1000004] LAUNCH harbor 127.0.0.1:2013 127.0.0.1:2526 1  
  7. [:1000006] LAUNCH localcast   
  8. [:1000007] LAUNCH snlua launcher  
  9. [:1000008] LAUNCH snlua main  
  10. [:1000008] lua do [main] error : error loading module 'skynet.c' from file './luaclib/skynet.so':  
  11.     dynamic libraries not enabled; check your Lua installation  
  12. stack traceback:  
  13.     [C]: in ?  
  14.     [C]: in function 'require'  
  15.     ./lualib/skynet.lua:1: in main chunk  
  16.     [C]: in function 'require'  
  17.     ./service/main.lua:1: in main chunk  
  18. [:1000007] lua do [launcher] error : error loading module 'skynet.c' from file './luaclib/skynet.so':  
  19.     dynamic libraries not enabled; check your Lua installation  
  20. stack traceback:  
  21.     [C]: in ?  
  22.     [C]: in function 'require'  
  23.     ./lualib/skynet.lua:1: in main chunk  
  24.     [C]: in function 'require'  
  25.     ./service/launcher.lua:1: in main chunk  
  26. [:1000008] KILL self  
  27. [:1000007] KILL self  
  28. [:1000002] Master connect to harbor(1) 127.0.0.1:2526  
  29. [:0] Drop message queue 1000007 (2 messages)  

在安装运行云风的skynet过程中出现这个错误

原因:lua加载c库会调用package.loadlib,官方文档中解释:This function is not supported by ANSI C. As such, it is only available on some platforms (Windows, Linux, Mac OS X, Solaris, BSD, plus other Unix systems that support the  dlfcn standard).
在loadlib.c的头部有如下说明:
/*
** $Id: loadlib.c,v 1.130 2017/01/12 17:14:26 roberto Exp $
** Dynamic library loader for Lua
** See Copyright Notice in lua.h
**
** This module contains an implementation of loadlib for Unix systems
** that have dlfcn, an implementation for Windows, and a stub for other
** systems.
*/
开始是用rudix安装的lua,后来重新从官网下载lua源代码编译 make macosx install 

猜你喜欢

转载自blog.csdn.net/u010144805/article/details/80760445