在 Wind River 7.0 上安裝 Postgresql 的最快方法是什麼?

在 Wind River 7.0 上安裝 Postgresql 的最快方法是什麼?

我是基本 Linux 系統的新手,需要在 Wind River Linux 發行版上安裝 postgres。我的計劃是安裝 yum,然後使用 yum 安裝 postgres rpm。

我嘗試安裝 yum,但收到以下錯誤:導入運行 yum 所需的 Python 模組之一時出現問題。導致此問題的錯誤是:

No module named yum

Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.7.3 (default, Dec 21 2015, 05:03:08) 
[GCC 4.9.1]

If you cannot solve this problem yourself, please go to 
the yum faq at:
  http://yum.baseurl.org/wiki/Faq

系統上只有一個Python版本,它是Python 2.7.3,位於usr/lib/python2.7。

看來這個錯誤通常是由於安裝了多個版本的 python 造成的,但我只有一個。這是否意味著我安裝的 yum 版本(3.4.3)適用於較新版本的 python?

我應該繼續嘗試安裝 yum 然後安裝 postgres 還是使用不同的方法來安裝 postgres ie 手動找到 rpm 文件這裡

答案1

Wind River 的 Linux 旨在用於「建置一次然後發布」類型的映像,這種映像不能很好地與 yum 或 apt 等套件管理配合使用。它通常也不能很好地處理那些在將映像寫入嵌入式設備後想要寫入檔案系統的東西,例如資料庫伺服器——所以他們可能沒有它供你安裝(並且從 yum 安裝是由於二進位不相容,很可能會失敗)。

如果您確實需要 PostgreSQL,請問問自己 Wind River Linux 是否是適合該工作的工具(我的猜測是不是)。如果您仍然這麼認為,則必須從原始程式碼編譯 PostgreSQL。

相關內容