postgresql从本地repo安装 - 为什么它无法从repo下载?

时间:2014-02-02 09:11:01

标签: linux postgresql installation centos

我正在尝试在centos 6中安装postgresql 9.3来执行此操作我从http://yum.postgresql.org/9.3/redhat/rhel-6.0-x86_64/下载了所有必需的rpms和repodata

所以我做了一个像

这样的文件夹结构
/postgre/9/
   repodata
   RPMS
      noarch
      x86_64

我已将rpms放在x_86_64文件夹中。之后创建一个yum repo

[local-postgre]
baseurl=file:///root/postgre/9
gpgcheck=0

之后我运行命令“yum list | grep postgre”并获得以下输出

Repository 'local-cm' is missing name in configuration, using id
Repository 'local-cdh4' is missing name in configuration, using id
Repository 'local-postgre' is missing name in configuration, using id
postgresql-jdbc.noarch         8.4.701-8.el6                   @base/$releasever
postgresql-libs.x86_64         8.4.18-1.el6_4                  @base/$releasever
barman.noarch                  1.2.3-1.rhel6                   local-postgre
boxinfo.noarch                 1.4.0-1.rhel6                   local-postgre
check_postgres.noarch          2.21.0-1.rhel6                  local-postgre
compat-libevent14.x86_64       1.4.13-1.rhel6                  local-postgre
                               1.4.13-1.rhel6                  local-postgre
compat-libevent14-devel.x86_64 1.4.13-1.rhel6                  local-postgre
emaj.x86_64                    1.1.0-1.rhel6                   local-postgre
emaj-debuginfo.x86_64          1.1.0-1.rhel6                   local-postgre
gdal.x86_64                    1.9.2-4.el6                     local-postgre
gdal-devel.x86_64              1.9.2-4.el6                     local-postgre
gdal-java.x86_64               1.9.2-4.el6                     local-postgre
gdal-javadoc.noarch            1.9.2-4.el6                     local-postgre
gdal-libs.x86_64               1.9.2-4.el6                     local-postgre
gdal-perl.x86_64               1.9.2-4.el6                     local-postgre
gdal-python.x86_64             1.9.2-4.el6                     local-postgre
geos.x86_64                    3.4.2-1.rhel6                   local-postgre
geos-debuginfo.x86_64          3.4.2-1.rhel6                   local-postgre
geos-devel.x86_64              3.4.2-1.rhel6                   local-postgre
geos-python.x86_64             3.4.2-1.rhel6                   local-postgre
gpsbabel.x86_64                1.4.4-1.el6                     local-postgre
ip4r93.x86_64                  2.0-1.rhel6                     local-postgre
ip4r93-debuginfo.x86_64        2.0-1.rhel6                     local-postgre
libevent.x86_64                2.0.19-1.rhel6                  local-postgre
libevent-debuginfo.x86_64      2.0.19-1.rhel6                  local-postgre
libevent-devel.x86_64          2.0.19-1.rhel6                  local-postgre
libgeotiff.x86_64              1.4.0-1.el6                     local-postgre
libgeotiff-devel.x86_64        1.4.0-1.el6                     local-postgre
libmemcached.x86_64            1.0.17-1.rhel6                  local-postgre
libmemcached-debuginfo.x86_64  1.0.17-1.rhel6                  local-postgre
libmemcached-devel.x86_64      1.0.17-1.rhel6                  local-postgre
libpqxx.x86_64                 1:4.0.1-1.rhel6                 local-postgre
libpqxx-debuginfo.x86_64       1:4.0.1-1.rhel6                 local-postgre
libpqxx-devel.x86_64           1:4.0.1-1.rhel6                 local-postgre
ora2pg.noarch                  12.0-1.rhel6                    local-postgre
pagila93.noarch                0.10.1-1.rhel6                  local-postgre
pg_activity.noarch             0.2.0-1.rhel6                   local-postgre
pg_comparator93.x86_64         2.2.1-1.rhel6                   local-postgre
                               2.2.1-1.rhel6                   local-postgre
pg_jobmon93.noarch             1.1.3-1.rhel6                   local-postgre
pg_partman93.x86_64            1.4.3-1.rhel6                   local-postgre
pg_partman93-debuginfo.x86_64  1.4.3-1.rhel6                   local-postgre
pg_top93.x86_64                3.7.0-1.rhel6                   local-postgre
pg_top93-debuginfo.x86_64      3.7.0-1.rhel6                   local-postgre
pgadmin3_93.x86_64             1.18.1-2.rhel6                  local-postgre
pgadmin3_93-debuginfo.x86_64   1.18.1-2.rhel6                  local-postgre
pgadmin3_93-docs.x86_64        1.18.1-2.rhel6                  local-postgre
pgbadger.noarch                4.1-1.rhel6                     local-postgre
pgbouncer.x86_64               1.5.4-2.rhel6                   local-postgre
pgbouncer-debuginfo.x86_64     1.5.4-2.rhel6                   local-postgre
pgcluu.noarch                  1.0-1.rhel6                     local-postgre
pgdg-centos93.noarch           9.3-1                           local-postgre
pgdg-redhat93.noarch           9.3-1                           local-postgre
pgdg-sl93.noarch               9.3-1                           local-postgre
pgfincore93.x86_64             1.1.1-1.rhel6                   local-postgre
pgfincore93-debuginfo.x86_64   1.1.1-1.rhel6                   local-postgre
pgloader.x86_64                2.3.2-1.rhel6                   local-postgre
pgmemcache-93.x86_64           2.1.2-1.rhel6                   local-postgre
pgmemcache-93-debuginfo.x86_64 2.1.2-1.rhel6                   local-postgre
pgpool-II-93.x86_64            3.3.1-1.rhel6                   local-postgre
pgpool-II-93-debuginfo.x86_64  3.3.1-1.rhel6                   local-postgre
pgpool-II-93-devel.x86_64      3.3.1-1.rhel6                   local-postgre
pgxnclient.x86_64              1.2.1-1.rhel6                   local-postgre
pgxnclient-debuginfo.x86_64    1.2.1-1.rhel6                   local-postgre
phpPgAdmin.noarch              5.1-1.rhel6                     local-postgre
plproxy93.x86_64               2.5-1.rhel6                     local-postgre
plproxy93-debuginfo.x86_64     2.5-1.rhel6                     local-postgre
plr93.x86_64                   8.3.0.15-1.rhel6                local-postgre
plr93-debuginfo.x86_64         8.3.0.15-1.rhel6                local-postgre
plv8_93.x86_64                 1.4.1-1.rhel6                   local-postgre
plv8_93-debuginfo.x86_64       1.4.1-1.rhel6                   local-postgre
postgis2_93.x86_64             2.1.1-1.rhel6                   local-postgre
postgis2_93-client.x86_64      2.1.1-1.rhel6                   local-postgre
postgis2_93-debuginfo.x86_64   2.1.1-1.rhel6                   local-postgre
postgis2_93-devel.x86_64       2.1.1-1.rhel6                   local-postgre
postgis2_93-docs.x86_64        2.1.1-1.rhel6                   local-postgre
postgis2_93-utils.x86_64       2.1.1-1.rhel6                   local-postgre
postgresql93.x86_64            9.3.2-1PGDG.rhel6               local-postgre
postgresql93-contrib.x86_64    9.3.2-1PGDG.rhel6               local-postgre
postgresql93-debuginfo.x86_64  9.3.2-1PGDG.rhel6               local-postgre
postgresql93-devel.x86_64      9.3.2-1PGDG.rhel6               local-postgre
postgresql93-docs.x86_64       9.3.2-1PGDG.rhel6               local-postgre
postgresql93-jdbc.x86_64       9.3.1100-1PGDG.rhel6            local-postgre
postgresql93-jdbc-debuginfo.x86_64
                               9.3.1100-1PGDG.rhel6            local-postgre
postgresql93-libs.x86_64       9.3.2-1PGDG.rhel6               local-postgre
postgresql93-odbc.x86_64       09.02.0100-1PGDG.rhel6          local-postgre
postgresql93-odbc-debuginfo.x86_64
                               09.02.0100-1PGDG.rhel6          local-postgre
postgresql93-plperl.x86_64     9.3.2-1PGDG.rhel6               local-postgre
postgresql93-plpython.x86_64   9.3.2-1PGDG.rhel6               local-postgre
postgresql93-pltcl.x86_64      9.3.2-1PGDG.rhel6               local-postgre
postgresql93-server.x86_64     9.3.2-1PGDG.rhel6               local-postgre
postgresql93-test.x86_64       9.3.2-1PGDG.rhel6               local-postgre
postgresql_autodoc.noarch      1.41-1.rhel6                    local-postgre
proj.x86_64                    4.8.0-2.rhel6                   local-postgre
proj-debuginfo.x86_64          4.8.0-2.rhel6                   local-postgre
proj-devel.x86_64              4.8.0-2.rhel6                   local-postgre
proj-epsg.x86_64               4.8.0-2.rhel6                   local-postgre
proj-nad.x86_64                4.8.0-2.rhel6                   local-postgre
python-argcomplete.noarch      0.3.7-1.rhel6                   local-postgre
python-argh.noarch             0.23.0-1.rhel6                  local-postgre
python-argparse.noarch         1.2.1-2.el6                     local-postgre
python-psycopg2.x86_64         2.5.2-1.rhel6                   local-postgre
                               2.5.2-1.rhel6                   local-postgre
python-psycopg2-doc.x86_64     2.5.2-1.rhel6                   local-postgre
python-psycopg2-test.x86_64    2.5.2-1.rhel6                   local-postgre
repmgr.x86_64                  1.2.0-1.rhel6                   local-postgre
repmgr-debuginfo.x86_64        1.2.0-1.rhel6                   local-postgre
skytools-93.x86_64             3.1.5-1.rhel6                   local-postgre
skytools-93-debuginfo.x86_64   3.1.5-1.rhel6                   local-postgre
skytools-93-modules.x86_64     3.1.5-1.rhel6                   local-postgre
slony1-93.x86_64               2.2.1-1.rhel6                   local-postgre
slony1-93-debuginfo.x86_64     2.2.1-1.rhel6                   local-postgre
split_postgres_dump.noarch     1.3.3-1.rhel6                   local-postgre
tail_n_mail.noarch             1.26.3-1.rhel6                  local-postgre
usda-r18.noarch                1.0-2.rhel6                     local-postgre
v8.x86_64                      1:3.14.5.10-2.el6               local-postgre
v8-devel.x86_64                1:3.14.5.10-2.el6               local-postgre

但是当我尝试“yum install postgresql-server”时,它无法从repo下载。

Resolving Dependencies
--> Running transaction check
---> Package postgresql93-server.x86_64 0:9.3.2-1PGDG.rhel6 will be installed
--> Processing Dependency: postgresql93 = 9.3.2-1PGDG.rhel6 for package: postgresql93-server-9.3.2-1PGDG.rhel6.x86_64
--> Running transaction check
---> Package postgresql93.x86_64 0:9.3.2-1PGDG.rhel6 will be installed
--> Processing Dependency: postgresql93-libs = 9.3.2-1PGDG.rhel6 for package: postgresql93-9.3.2-1PGDG.rhel6.x86_64
--> Running transaction check
---> Package postgresql93-libs.x86_64 0:9.3.2-1PGDG.rhel6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================
 Package                       Arch             Version                       Repository               Size
============================================================================================================
Installing:
 postgresql93-server           x86_64           9.3.2-1PGDG.rhel6             local-postgre           4.0 M
Installing for dependencies:
 postgresql93                  x86_64           9.3.2-1PGDG.rhel6             local-postgre           1.0 M
 postgresql93-libs             x86_64           9.3.2-1PGDG.rhel6             local-postgre           190 k

Transaction Summary
============================================================================================================
Install       3 Package(s)

Total download size: 5.2 M
Installed size: 21 M
Is this ok [y/N]: y
Downloading Packages:


Error Downloading Packages:
  postgresql93-server-9.3.2-1PGDG.rhel6.x86_64: failure: postgresql93-server-9.3.2-1PGDG.rhel6.x86_64.rpm from local-postgre: [Errno 256] No more mirrors to try.
  postgresql93-9.3.2-1PGDG.rhel6.x86_64: failure: postgresql93-9.3.2-1PGDG.rhel6.x86_64.rpm from local-postgre: [Errno 256] No more mirrors to try.
  postgresql93-libs-9.3.2-1PGDG.rhel6.x86_64: failure: postgresql93-libs-9.3.2-1PGDG.rhel6.x86_64.rpm from local-postgre: [Errno 256] No more mirrors to try.

我的centos 6 linux与互联网无关。

1 个答案:

答案 0 :(得分:1)

您无需手动执行此操作。你可以,但你要求麻烦。尝试安装repo包,例如:

wget http://yum.postgresql.org/9.0/redhat/rhel-6-x86_64/pgdg-centos90-9.0-5.noarch.rpm

rpm -ivh pgdg-centos90-9.0-5.noarch.rpm

yum list | grep pgdg90

在那里,你已经完成了。已安装repo,gpg键设置,您可以从repo安装所需的任何内容。