分页: 1 / 1

1604编译wesnoth出错,请教高人!

发表于 : 2016-05-16 16:46
dfsr
系统是Ubuntu 1604 64bit的,在wesnoth目录下直接:scons,有如下错误提示:
Package sdl was not found in the pkg-config search path.
Perhaps you should add the directory containing `sdl.pc'
to the PKG_CONFIG_PATH environment variable
No package 'sdl' found
/bin/sh: 1: sdl-config: not found
Checking for Simple DirectMedia Layer library version >= 1.2.7... no
Base prerequisites are not met.
Client prerequisites are not met. wesnoth, cutter and exploder cannot be built.
Unit tests are disabled because their prerequisites are not met.
If any config checks fail, look in build/config.log for details
If a check fails spuriously due to caching, use --config=force to force its rerun
error: No repo or cache detected.
scons: done reading SConscript files.
scons: Building targets ...
error_action(["wesnoth"], [])
scons: *** [wesnoth] Target disabled because its prerequisites are not met
scons: building terminated because of errors.

但是我已经:
sudo apt-get install libsdl2-2.0
sudo apt-get install libsdl2-dev

上面都提示还是依旧,请问可有办法?

Re: 1604编译wesnoth出错,请教高人!

发表于 : 2016-05-16 17:01
vickycq
dfsr 写了: Perhaps you should add the directory containing `sdl.pc'
/bin/sh: 1: sdl-config: not found
但是我已经:
sudo apt-get install libsdl2-2.0
sudo apt-get install libsdl2-dev
它想要的是 sdl.pc 然而您安装的 libsdl2-dev 提供的是 sdl2.pc
可尝试安装 libsdl1.2-dev

它想要的是 sdl-config 然而您安装的 libsdl2-dev 提供的是 sdl2-config
可尝试安装 libsdl1.2-dev

===============================

1.
用 apt-file 搜索包含某个具体文件的包名
先安装 apt-file 套件
第一次使用 apt-file 需要先建立索引(用 root 身份运行一次 apt-file update)

代码: 全选

$ apt-file search sdl-config
emscripten: /usr/share/emscripten/system/bin/sdl-config
libsdl1.2-dev: /usr/bin/sdl-config
libsdl1.2-dev: /usr/share/man/man1/sdl-config.1.gz
lush-library: /usr/share/lush/packages/sdl/sdl-config.lsh
可见 sdl-config 包含在 libsdl1.2-dev 这个包中

2.
也可到 http://packages.ubuntu.com/ - Search the contents of packages
单选按钮选择 'packages that contain files whose names contain the keyword'
关键词填 sdl-config
搜索,得到 http://packages.ubuntu.com/search?searc ... l&arch=any
可见 sdl-config 包含在 libsdl1.2-dev 这个包中

Re: 1604编译wesnoth出错,请教高人!

发表于 : 2016-05-16 17:12
dfsr
vickycq 写了:
dfsr 写了: Perhaps you should add the directory containing `sdl.pc'
/bin/sh: 1: sdl-config: not found
但是我已经:
sudo apt-get install libsdl2-2.0
sudo apt-get install libsdl2-dev
它想要的是 sdl.pc 然而您安装的 libsdl2-dev 提供的是 sdl2.pc
可尝试安装 libsdl1.2-dev

它想要的是 sdl-config 然而您安装的 libsdl2-dev 提供的是 sdl2-config
可尝试安装 libsdl1.2-dev

===============================

1.
用 apt-file 搜索包含某个具体文件的包名
先安装 apt-file 套件
第一次使用 apt-file 需要先建立索引(用 root 身份运行一次 apt-file update)

代码: 全选

$ apt-file search sdl-config
emscripten: /usr/share/emscripten/system/bin/sdl-config
libsdl1.2-dev: /usr/bin/sdl-config
libsdl1.2-dev: /usr/share/man/man1/sdl-config.1.gz
lush-library: /usr/share/lush/packages/sdl/sdl-config.lsh
可见 sdl-config 包含在 libsdl1.2-dev 这个包中

2.
也可到 http://packages.ubuntu.com/ - Search the contents of packages
单选按钮选择 'packages that contain files whose names contain the keyword'
关键词填 sdl-config
搜索,得到 http://packages.ubuntu.com/search?searc ... l&arch=any
可见 sdl-config 包含在 libsdl1.2-dev 这个包中
您好,我安装了libsdl1.2-dev后,有提示缺少:SDL_net library,具体提示如下:
Checking for SDL_net library... no
Checking for Boost system library... yes
Checking for Boost filesystem library version >= 1.44.0... yes
Checking for Boost locale library... yes
Base prerequisites are not met.
Client prerequisites are not met. wesnoth, cutter and exploder cannot be built.
Unit tests are disabled because their prerequisites are not met.
If any config checks fail, look in build/config.log for details
If a check fails spuriously due to caching, use --config=force to force its rerun
error: No repo or cache detected.
scons: done reading SConscript files.
scons: Building targets ...
error_action(["wesnoth"], [])
scons: *** [wesnoth] Target disabled because its prerequisites are not met
scons: building terminated because of errors.

Re: 1604编译wesnoth出错,请教高人!

发表于 : 2016-05-16 17:26
vickycq
dfsr 写了: 您好,我安装了libsdl1.2-dev后,有提示缺少:SDL_net library,具体提示如下:
Checking for SDL_net library... no
1.
用 apt-file 搜索包含某个具体文件的包名
先安装 apt-file 套件
第一次使用 apt-file 需要先建立索引(用 root 身份运行一次 apt-file update)

代码: 全选

$ apt-file search SDL_net.h
cmake-doc: /usr/share/doc/cmake-data/html/module/FindSDL_net.html
libsdl-net1.2-dev: /usr/include/SDL/SDL_net.h
libsdl2-net-dev: /usr/include/SDL2/SDL_net.h
可见 SDL/SDL_net.h 包含在 libsdl-net1.2-dev 这个包中

2.
也可到 http://packages.ubuntu.com/ - Search the contents of packages
单选按钮选择 'packages that contain files whose names contain the keyword'
关键词填 SDL_net.h
搜索,得到 http://packages.ubuntu.com/search?searc ... l&arch=any
可见 SDL_net.h 包含在 libsdl-net1.2-dev 这个包中

Re: 1604编译wesnoth出错,请教高人!

发表于 : 2016-05-17 12:54
dfsr
非常感谢vickycq,按照您的思路,已经解决了!
再拜。