无法在 Windows 上使用 cabal 安装 glib - 在配置步骤中

发布于 2024-12-07 00:52:01 字数 1470 浏览 2 评论 0原文

在 Windows 7 x64 上, 我尝试过:

 1. install gtk+ all in one bundle 2.16
 2. add MinGW's bin address to PATH Environment variables
 3. add GTK+'s bin address to PATH Environment variables

在命令行上执行:

cabal update
cabal install gtk2hs-buildtools

到目前为止一切顺利。但是当我执行:

cabal install gtk

出现错误

gtk-0.12.1 依赖于未能安装的 glib-0.12.1。

我执行下一个命令:

cabal install glib

然后我尝试:

cabal install glib --ghc-option=-DCABAL_VERSION_MINOR=10

结果:

Resolving dependencies...

[1 of 2] Compiling SetupWrapper     ( C:\Users\User\AppData\Local\Temp\glib-0.12
.16572\glib-0.12.1\SetupWrapper.hs, C:\Users\User\AppData\Local\Temp\glib-0.12.1
6572\glib-0.12.1\dist\setup\SetupWrapper.o )

[2 of 2] Compiling Main             ( C:\Users\User\AppData\Local\Temp\glib-0.12
.16572\glib-0.12.1\Setup.hs, C:\Users\User\AppData\Local\Temp\glib-0.12.16572\gl
ib-0.12.1\dist\setup\Main.o )

Linking C:\Users\User\AppData\Local\Temp\glib-0.12.16572\glib-0.12.1\dist\setup\
setup.exe ...

Warning: .drectve `-aligncomm:___gmp_junk,2' unrecognized

cabal: Error: some packages failed to install:

glib-0.12.1 failed during the configure step. The exception was:

C:\Users\User\AppData\Local\Temp\glib-0.12.16572\glib-0.12.1\dist\setup\setup.exe:

 runProcess: invalid argument (Exec format error)

帮助,谢谢!

On windows 7 x64,
I tried:

 1. install gtk+ all in one bundle 2.16
 2. add MinGW's bin address to PATH Environment variables
 3. add GTK+'s bin address to PATH Environment variables

On command line execute the:

cabal update
cabal install gtk2hs-buildtools

So far so good. But when I execute the:

cabal install gtk

the error arise

gtk-0.12.1 depends on glib-0.12.1 which failed to install.

I execute next command:

cabal install glib

Then I tried:

cabal install glib --ghc-option=-DCABAL_VERSION_MINOR=10

Relults:

Resolving dependencies...

[1 of 2] Compiling SetupWrapper     ( C:\Users\User\AppData\Local\Temp\glib-0.12
.16572\glib-0.12.1\SetupWrapper.hs, C:\Users\User\AppData\Local\Temp\glib-0.12.1
6572\glib-0.12.1\dist\setup\SetupWrapper.o )

[2 of 2] Compiling Main             ( C:\Users\User\AppData\Local\Temp\glib-0.12
.16572\glib-0.12.1\Setup.hs, C:\Users\User\AppData\Local\Temp\glib-0.12.16572\gl
ib-0.12.1\dist\setup\Main.o )

Linking C:\Users\User\AppData\Local\Temp\glib-0.12.16572\glib-0.12.1\dist\setup\
setup.exe ...

Warning: .drectve `-aligncomm:___gmp_junk,2' unrecognized

cabal: Error: some packages failed to install:

glib-0.12.1 failed during the configure step. The exception was:

C:\Users\User\AppData\Local\Temp\glib-0.12.16572\glib-0.12.1\dist\setup\setup.exe:

 runProcess: invalid argument (Exec format error)

Help, thanks!

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文