如何安装此 src.tar.gz 文件?

如何安装此 src.tar.gz 文件?

我听说可以安装或运行 .tar.gz 文件。这也是源代码,如果有区别,应该有人告诉我。游戏是 http://www.knightsgame.org.uk/files/knights_022_src.tar.gz。如果成功就太好了。这是一款好游戏,值得赞赏。;)

按照下面 mikewhatever 的指示操作,但遇到了:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libsdl1.2-dev' instead of 'libsdl-dev'
Note, selecting 'libfontconfig1-dev' instead of 'libfontconfig-dev'
build-essential is already the newest version.
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:
     libcurl4-gnutls-dev : Depends: libcurl3-gnutls (= 7.22.0-3ubuntu4.2) but 7.22.0-3ubuntu4.3 is to be installed
                           Depends: libgnutls-dev but it is not going to be installed
                           Depends: libldap2-dev but it is not going to be installed
                           Depends: librtmp-dev but it is not going to be installed
     libfontconfig1-dev : Depends: libfontconfig1 (= 2.8.0-3ubuntu9) but 2.8.0-3ubuntu9.1 is to be installed
     libsdl1.2-dev : Depends: libx11-dev but it is not going to be installed
                     Depends: libglu1-mesa-dev but it is not going to be installed
                     Depends: libpulse-dev but it is not going to be installed
                     Depends: libxt-dev but it is not going to be installed
                     Depends: libxext-dev but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.

apt-get autoclean删除了保留的包裹。

这让我寻找存储库,但 curl 和 libcurl 存储库没有 libcurl4-gnutls-dev。

答案1

我还没有安装该游戏,不知道它是否有效,但构建该特定源代码的步骤应该如下:

  • 提取

右键单击下载的文件,选择“在此处解压”。

  • 安装依赖项

打开一个终端窗口(Ubuntu 中为 ctrl-alt-t),然后输入以下命令。它将安装相当多的附加文件。

sudo apt-get install build-essential libboost-dev libboost-filesystem-dev libboost-system-dev libboost-thread-dev libsdl-dev libcurl4-gnutls-dev libfreetype6-dev libfontconfig-dev
  • 安装

仍在终端窗口中,使用 切换到源目录cd knights_022_src,然后运行make​​并等待。如果完成且没有错误,则运行sudo make install

相关内容