2015-03-25 13 views
6

मैं पोस्टग्रे और उबंटू के लिए नया हूं। मैं उबंटू 14.04 एलटीएस ट्रस्टी के साथ एक वीएम चला रहा हूं। मैं PostgreSql9.4 डाटाबेस स्थापित कोशिश कर रहा हूँ और PostGIS 2.1.Here आदेशों मैं Ubuntu मशीन पर दौड़ा रहे हैं:PostGIS -Ubuntu स्थापना निर्भरताओं के लिए पूछने में त्रुटि

sudo apt-get install wget ca-certificates 
sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt trusty-pgdg main" >> /etc/apt/sources.list' 
wget --quiet -O - http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc | sudo apt-key add - 
sudo apt-get update 
sudo apt-get upgrade 
sudo apt-get install postgresql-9.4-postgis-2.1 pgadmin3 postgresql-contrib 

हालांकि मैं निम्न त्रुटि हो रही है।

 
The following packages have unmet dependencies: 
pgadmin3 : Depends: libwxbase3.0-0 (>= 3.0.0) but it is not installable 
      Depends: libwxgtk3.0-0 (>= 3.0.0) but it is not installable 
      Recommends: pgagent but it is not going to be installed 
postgresql-9.4-postgis-2.1 : Depends: libgdal1h (>= 1.9.0) but it is not installable 
           Depends: libgeos-c1 (>= 3.4.2) but it is not installable 
           Depends: liblwgeom-2.1.5 (>= 2.1.2) but it is not going to be installed 
           Depends: libproj0 (>= 4.8.0-1) but it is not installable 
E: Unable to correct problems, you have held broken packages. 

मैं कई स्थानों की खोज और कई प्रतिक्रियाओं देखा था, लेकिन उनमें से कोई मेरे लिए काम। मैंने PostgreSQL9.3 भी कोशिश की और सफल भी नहीं हो सका। आपकी मदद के लिए अग्रिम धन्यवाद। धन्यवाद

उत्तर

8

आपके पास आपके आधिकारिक वितरण (इसलिए अनमेट निर्भरता) में पोस्टग्रेस्क्ल के भंडार पर संकुल का उच्च संस्करण उम्मीदवार है। एक संभावित समाधान है कि वे अपने डिस्ट्रो चैनलों से एक ही पैकेज को इंस्टॉल करके जांचें कि क्या वे उम्मीदवार (एपीटी-कैश पॉलिसी) के रूप में उपलब्ध हैं और विशिष्ट संस्करणों को स्थापित करने के लिए चुनते हैं (निर्भरताओं के लिए भी)।

अपने सिस्टम पर यह इस प्रकार है:

The following packages have unmet dependencies: 
pgadmin3 : Depends: libwxbase3.0-0 (>= 3.0.2) but it is not installable 
      Depends: libwxgtk3.0-0 (>= 3.0.2) but it is not installable 
      Recommends: pgagent but it is not going to be installed 

apt-cache policy pgadmin3 
pgadmin3: 
    Installed: (none) 
    Candidate: 1.20.0-1.pgdg70+1 
    Version table: 
    1.20.0-1.pgdg70+1 0 
     500 http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg/main amd64 Packages 
    1.14.2-2 0 
     500 http://ftp5.gwdg.de/pub/linux/debian/debian/ wheezy/main amd64 Packages 

तो आप के साथ कम संस्करण स्थापित करना चाहते हैं:

$ sudo apt-get install pgadmin3=1.14.2-2 pgadmin3-data=1.14.2-2 
+1

धन्यवाद, इससे लिनक्स टकसाल 18 पर भी मदद मिली। – Lazyexpert

2

, PostGIS जोड़ने एक जवाब मैं सिर्फ Ubuntu पर पोस्ट किए गए जोड़ने के लिए: https://askubuntu.com/questions/621383/installing-postgis-on-ubuntu-15-04

त्वरित पुनरावृत्ति: मैं उबंटू के लिए भी नया हूं लेकिन मेरी समझ एक है) postgresql-9.4 में अभी तक उबंटू के लिए पोस्टगिस नहीं बनाया गया है और बी) एक संस्करण compat है

  • (sudo apt-get install postgresql-9.3-postgis-2.1 के साथ स्थापित

    1. अचिह्नित या /etc/apt/sources.list से ubuntugis हटाने ("अन्य सॉफ्टवेयर" टैब): ubuntugis और भरोसेमंद, चरणों के बीच ibility मुद्दा मैं थे ठीक करने के लिए इस्तेमाल किया ध्यान दें: apt-cache search postgresql-9 का उपयोग क्या PostGIS के संस्करण उपलब्ध हैं देखने के लिए)

    2. पुष्टि psql के साथ स्थापित, psql रन CREATE EXTENSION postgis; में, और \dx

    3. के साथ जोड़ा पुष्टि

      apt-cache policy pgadmin3 
      

      फिर उस संस्करण स्थापित (समय में बदलने के लिए, उचित संस्करण का उपयोग कर सकते हैं:

      सबसे पहले मैं भंडार पर उपलब्ध संस्करण की जाँच:

  • 0

    यह है कि मैं क्या अंत में स्थापित करने के लिए pgadmin3 किया है पिछले कमांड द्वारा दिखाया गया है):

    sudo apt-get install pgadmin3=1.22.2-1 pgadmin-data=1.22.2-1 
    
    संबंधित मुद्दे