安裝dbus-python的簡要教程

來源:互聯網
上載者:User

安裝dbus-python的簡要教程

   這篇文章主要介紹了安裝dbus-python的簡要教程,dbus-python在Python編程中多用於處理進程之間的通訊,需要的朋友可以參考下

  寫一個 python 指令碼需要用到 dbus,但因為 dbus-python 這個包並沒有提供 setup.py , 所以無法通過 pip 直接安裝,唯有下載源碼手動編譯安裝一途了。

  ?

1

2

3

wget https://pypi.python.org/packages/source/d/dbus-python/dbus-python-0.84.0.tar.gz

tar zxvf dbus-python-0.84.0.tar.gz

cd dbus-python-0.84.0

  但事有不順,在 ./configure 的過程中,還是出了一些錯。

  ?

1

2

3

4

5

6

7

8

9

10

configure: error: Package requirements (dbus-1 >= 1.0) were not met:

 

No package 'dbus-1' found

 

Consider adjusting the PKG_CONFIG_PATH environment variable if you

installed software in a non-standard prefix.

 

Alternatively, you may set the environment variables DBUS_CFLAGS

and DBUS_LIBS to avoid the need to call pkg-config.

See the pkg-config man page for more details.

  這顯然是缺失了依賴庫

  ?

1

sudo apt-get install libdbus-glib-1-dev

  然後安裝就就可以順利進行了

  ?

1

2

3

./configure

make

sudo make install

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.