我尝试在我的MacBookPro上运行cargo run
用于GTK3/Rust应用程序,我得到这个错误:
cargo:warning=`PKG_CONFIG_ALLOW_SYSTEM_CFLAGS="1" "pkg-config" "--libs" "--cflags" "gobject-2.0" "gobject-2.0 >= 2.56"` did not exit successfully: exit status: 1
error: could not find system library 'gobject-2.0' required by the 'gobject-sys' crate
--- stderr
Package gobject-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gobject-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gobject-2.0' found
Package gobject-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gobject-2.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gobject-2.0' found
不知道这里发生了什么,也不知道如何解决。
安装依赖项:
sudo apt-get install libglib2.0-dev