Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

891
Views
¿Dónde está el archivo `glib-2.0` en Linux?

Tengo una aplicación Gtk simple en Rust, pero recibo este error al compilar:

 Package glib-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `glib-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'glib-2.0' found

Y sí, leí No se puede compilar gstreamer en Windows porque falta glib-2.0 , pero aún no contiene toda la información que necesito.

Puse export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig/ en /home/user/.profile (como se muestra en Can't Set Environment Variables in ~/.profile ), y también lo ejecuté directamente en el directorio del proyecto Rust, en vano. Usé esa ruta porque parecía más cercana a la de la pregunta de Windows, aunque había muchos directorios pkgconfig en el sistema, en varios lugares.

Aquí está mi código de óxido:

 use gtk::prelude::*; use gtk::{Application, ApplicationWindow}; fn main() { let app = Application::builder() .application_id("org.example.HelloWorld") .build(); app.connect_activate(|app| { // We create the main window. let window = ApplicationWindow::builder() .application(app) .default_width(320) .default_height(200) .title("Hello, World!") .build(); // Show the window. window.show(); }); app.run(); }

y aquí está Cargo.toml:

 [package] name = "gtk_test" version = "0.1.0" edition = "2018" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] gtk = { version = "0.2", package = "gtk4" }

Entonces mi pregunta: ¿dónde está el archivo glib-2.0.pc en Linux? ¿Tiene otro nombre o hay que instalarlo?

over 4 years ago · Santiago Trujillo
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!