没有规则可以创建目标 /usr/lib/libX11.so

发布于 2024-11-15 09:02:53 字数 1483 浏览 2 评论 0原文

我正在使用 SFML 库编写一个程序,它需要 libX11。我最近刚刚从旧版本升级到 ubuntu 11.04,从那以后我就无法编译我的程序。我收到以下错误:

make[3]: *** No rule to make target `/usr/lib/libX11.so', needed by `lib/libsfml-window.so.2.0.0'.  Stop.

我想也许当我升级 Ubuntu 时,该软件包由于某种原因被卸载,但根据 Synaptic,我有 libX11-dev (我只是假设这就是我应该寻找的,但我可能是错的)。

编辑:

运行 apt-get install libx11-dev 给出以下输出:

sudo apt-get install libx11-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libx11-dev is already the newest version.
  g++-4.4 libstdc++6-4.4-dev
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 32 not upgraded.

并使用 --reinstall 标志运行给出以下输出:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  g++-4.4 libstdc++6-4.4-dev
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 32 not upgraded.
Need to get 0 B/3,104 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 279595 files and directories currently installed.)
Preparing to replace libx11-dev 2:1.4.2-1ubuntu3 (using .../libx11-dev_2%3a1.4.2-1ubuntu3_i386.deb) ...
Unpacking replacement libx11-dev ...
Processing triggers for man-db ...
Setting up libx11-dev (2:1.4.2-1ubuntu3) ...

I'm writing a program using the library SFML, which requires libX11. I just recently upgraded to ubuntu 11.04 from an older version, and ever since I did I can't compile my program. I get the following error:

make[3]: *** No rule to make target `/usr/lib/libX11.so', needed by `lib/libsfml-window.so.2.0.0'.  Stop.

I thought maybe that when I upgraded Ubuntu that package was uninstalled for some reason, but according to Synaptic, I have libX11-dev (I'm just assuming that's what I should be looking for, but I'm probably wrong).

Edit:

Running apt-get install libx11-dev gives this output:

sudo apt-get install libx11-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libx11-dev is already the newest version.
  g++-4.4 libstdc++6-4.4-dev
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 32 not upgraded.

and running with the --reinstall flag gives this:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  g++-4.4 libstdc++6-4.4-dev
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 32 not upgraded.
Need to get 0 B/3,104 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 279595 files and directories currently installed.)
Preparing to replace libx11-dev 2:1.4.2-1ubuntu3 (using .../libx11-dev_2%3a1.4.2-1ubuntu3_i386.deb) ...
Unpacking replacement libx11-dev ...
Processing triggers for man-db ...
Setting up libx11-dev (2:1.4.2-1ubuntu3) ...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

扮仙女 2024-11-22 09:02:53

事实证明,对所有内容进行简单的 make clean 就足够了。我仍然不清楚更新之间发生了什么,但是当我从头开始重建项目时,一切都会编译并正常工作。

Turns out a simple make clean on everything was all I needed. I'm still unclear as to what happened between updates, but everything compiles and works when I rebuild the project form scratch.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文