AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题

问题[sdl](ubuntu)

Martin Hope
eri0o
Asked: 2020-12-21 06:46:43 +0800 CST

如何从源代码构建 SDL2 并制作 debian 包并安装 debian 包?

  • 1

我想从源代码构建 SDL2,这样我就可以使用更新的版本,它更喜欢 dlopen 而不是链接到像来自 ubuntu 包管理器的包之类的库,但也因为我想在旧版本的 Ubuntu 中构建它,所以它有更好的 glibc 兼容性。

问题是我还想生成一个工件,它是我的项目的 debian 包,但我还需要将 SDL2 构建为安装在系统上的 debian 包,以便在打包我的项目时生成正确的规则。

我从 SDL2 (2.0.12) 解压源代码,使用./configure并make构建源代码。然后我用来 dpkg-buildpackage -us -uc为 SDL2 构建 debian 包。问题是生成的软件包无法安装并抱怨未满足的 libudev 依赖项,该依赖项已安装在我的系统中。从 sdl2 源构建 debian 包时我缺少什么吗?

dpkg packaging make sdl
  • 1 个回答
  • 539 Views
Martin Hope
Max
Asked: 2019-05-27 04:33:01 +0800 CST

在 Ubuntu 中安装 SDL 游戏

  • 0

我正在尝试在 Ubuntu 上安装 2Pong 进行实验,但我无法弄清楚如何让它运行。我安装了所有要求并按照自述文件中的说明进行操作,但经过多次搜索,我仍然找不到解决方案。

我也尝试按照他们网站上的 SDL 说明进行操作,但没有成功。

自述文件指出:

要求:

  • SDL
  • SDL_Net
  • SDL_Mixer
  • 图标v
  • zlib
  • libxml2

编译:

  • 光盘源
  • 制作

我安装了所有东西,但是当我尝试执行时:

sudo make src

我得到:

make: Nothing to be done for 'src'.

文件夹中的文件有:2Pong、src(文件夹)、README和conf.xml。

游戏链接:

http://twopong.sourceforge.net/

编辑:实施 SurvivalMachine 的修复后我的错误:

In file included from net.cpp:1:0:
net.h:5:10: fatal error: SDL/SDL_net.h: No such file or directory
 #include <SDL/SDL_net.h>
          ^~~~~~~~~~~~~~~
compilation terminated.
Makefile:52: recipe for target 'net.o' failed
make: *** [net.o] Error 1
games sdl
  • 1 个回答
  • 1457 Views
Martin Hope
mgw
Asked: 2019-05-12 08:51:16 +0800 CST

QEMU 警告 SDL 1.2 已弃用

  • 1

在终端中启动 QEMU

qemu-system-x86_64 -enable-kvm -m 6G -smp cores=3 -cpu host -drive file=...

产生以下警告:

不推荐使用 SDL 1.2 运行 QEMU,并将在未来的版本中删除。请改用 SDL 2.0

问题 如何“切换”到 SDL 2.0?简单地安装 libsdl2-2.0 包不会改变任何东西......

virtualization kvm sdl
  • 2 个回答
  • 1529 Views
Martin Hope
Evan S
Asked: 2015-05-21 11:22:06 +0800 CST

编译错误/usr/bin/ld: 找不到-lSDL collect2

  • 1

当我做

$ gcc cube.c -lglut -lGL -lGLU -lSDL 
/usr/bin/ld: cannot find -lSDL
collect2: error: ld returned 1 exit status

当我做

$ sudo apt-get install libsdl*
Reading package lists...
Building dependency tree...
Reading state information...
libsdl-image1.2 is already the newest version.
libsdl-image1.2 set to manually installed.
libsdl1.2debian is already the newest version.
libsdl1.2debian set to manually installed.
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libsdformat-dev : Depends: libboost-regex-dev but it is not going to be installed
                   Depends: liburdfdom-dev but it is not going to be installed
 libsdl-image1.2-dev : Depends: libtiff-dev
 libsdl-mixer1.2-dev : Depends: libflac-dev (>= 1.2.1) but it is not going to be installed
                       Depends: libvorbis-dev (>= 1.2.0) but it is not going to be installed
 libsdl1.2-dbg : Depends: libsdl1.2debian (= 1.2.15-8ubuntu1) but 1.2.15-8ubuntu1.1 is to be installed
 libsdl1.2-dev : Depends: libsdl1.2debian (= 1.2.15-8ubuntu1) but 1.2.15-8ubuntu1.1 is to be installed
                 Depends: libpulse-dev but it is not going to be installed
 libsdl2-dev : Depends: libpulse-dev but it is not going to be installed
               Depends: libudev-dev but it is not going to be installed

似乎 libsdl 安装不成功。在搜索 libsdl 时,有两个版本 libsdl1 和 libsdl2。我正在考虑寻找其他安装它们的方法。有人对安装有什么建议吗?

@steeldriver:我做了你的建议,输出如下:

$ sudo apt-get update && sudo apt-get upgrade
finished...

$ sudo apt-get install libsdl1.2-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libsdl1.2-dev : Depends: libsdl1.2debian (= 1.2.15-8ubuntu1) but 1.2.15-8ubuntu1.1 is to be installed
                 Depends: libpulse-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

AB 如您所愿。这是您评论中命令的输出。

当我做的

$ apt-cache policy libsdl1.2-dev
libsdl1.2-dev:
  Installed: (none)
  Candidate: 1.2.15-8ubuntu1
  Version table:
     1.2.15-8ubuntu1 0
        500 http://ubuntu.mirror.crucial.com.au/ trusty/main amd64 Packages

当我做的

$ apt-cache policy libsdl1.2debian
libsdl1.2debian:
  Installed: 1.2.15-8ubuntu1.1
  Candidate: 1.2.15-8ubuntu1.1
  Version table:
 *** 1.2.15-8ubuntu1.1 0
        100 /var/lib/dpkg/status
     1.2.15-8ubuntu1 0
        500 http://ubuntu.mirror.crucial.com.au/ trusty/main amd64 Packages

当我做的

$ apt-cache policy libpulse-dev
libpulse-dev:
  Installed: (none)
  Candidate: 1:4.0-0ubuntu11
  Version table:
     1:4.0-0ubuntu11 0
        500 http://ubuntu.mirror.crucial.com.au/ trusty/main amd64 Packages

AB:当我这样做的时候。降级发生了。

$ sudo apt-get install libsdl1.2debian=1.2.15-8ubuntu1
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be DOWNGRADED:
  libsdl1.2debian
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
Need to get 162 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
WARNING: The following packages cannot be authenticated!
  libsdl1.2debian
Install these packages without verification? [y/N] y
Get:1 http://ubuntu.mirror.crucial.com.au/ trusty/main libsdl1.2debian amd64 1.2.15-8ubuntu1 [162 kB]
Fetched 162 kB in 0s (243 kB/s)     
dpkg: warning: downgrading libsdl1.2debian:amd64 from 1.2.15-8ubuntu1.1 to 1.2.15-8ubuntu1
(Reading database ... 443054 files and directories currently installed.)
Preparing to unpack .../libsdl1.2debian_1.2.15-8ubuntu1_amd64.deb ...
Unpacking libsdl1.2debian:amd64 (1.2.15-8ubuntu1) over (1.2.15-8ubuntu1.1) ...
Setting up libsdl1.2debian:amd64 (1.2.15-8ubuntu1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.6) ...

根据道格的建议解决

Open up Software & Updates > Updates tab & make sure that 
the first 2 are enabled. (- trusty-security, trusty-updates). 
If one or the other wasn't enabled then do so, 
after that reload sources & proceed.

感谢您的解决方案,道格!感谢所有参与这个问题的人,尤其是 steeldriver 和 AB!

sdl
  • 2 个回答
  • 3609 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve