【问题标题】:Can't Install FreeTDS via Yum Package Manager无法通过 Yum 包管理器安装 FreeTDS
【发布时间】:2013-12-09 09:16:58
【问题描述】:

我尝试按照下面文章中的说明进行操作,但它显示“没有可用的软件包 freetds。

http://www.hosting.com/support/linux/installing-freetds-for-linux/

这是我的 I/O:

[root@mydomain ~]# yum search freetds
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.web-ster.com
 * extras: mirror.beyondhosting.net
 * updates: mirrors.sonic.net
=============================== Matched: freetds ===============================
php-mssql.x86_64 : MSSQL database module for PHP
[root@mydomain ~]# yum install freetds
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.web-ster.com
 * extras: mirror.beyondhosting.net
 * updates: mirrors.sonic.net
Setting up Install Process
No package freetds available.
Error: Nothing to do

如何安装 freetds?我只是想连接到 SQL Server!

编辑:

yum install php-mssql之后:

[root@mydomain ~]# yum install php-mssql
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.web-ster.com
 * extras: mirror.beyondhosting.net
 * updates: mirrors.sonic.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-mssql.x86_64 0:5.4.13-1.el6.remi will be installed
--> Processing Dependency: libsybdb.so.5()(64bit) for package: php-mssql-5.4.13-1.el6.remi.x86_64
--> Finished Dependency Resolution
Error: Package: php-mssql-5.4.13-1.el6.remi.x86_64 (mt_dv_extras)
           Requires: libsybdb.so.5()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

【问题讨论】:

  • 我会尝试yum install php-mssql,如果这不起作用,我会看看these instructions
  • 我试过了,现在似乎说我缺少依赖项。我可以做yum install libsybdb吗?我不想在询问之前尝试,因为没有撤消按钮:)
  • 你总是可以卸载东西。我不了解 CentOS——我很久以前就停止使用 RedHat(CentOS 所基于的)——所以我无法为您提供有关如何完成任务的确切指示。如果您在此处找不到更多帮助,不妨访问一些 CentOS 论坛或 IRC 频道。
  • 好的,我明白了。感谢那个链接,这对我帮助最大:)

标签: linux centos plesk yum freetds


【解决方案1】:

如果您不想使用 RPM Forge 软件包,freetdsphp-mssql 也可以在 EPEL 中使用。

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -ivh epel-release-6-8.noarch.rpm
sudo yum install freetds freetds-devel

【讨论】:

  • 是的,但仅限于 0.91 版本
【解决方案2】:

正如上面 Benny Hill 的评论所采用的那样,这就是为我安装 freetds 的原因:

rpm -ivh ftp://fr2.rpmfind.net/linux/dag/redhat/el6/en/x86_64/dag/RPMS/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm

cd /etc/yum.repos.d/
wget http://rpms.famillecollet.com/enterprise/remi.repo

yum install freetds
yum install freetds-devel
yum install --enablerepo=remi php-mssql

转自https://gist.github.com/shf/2052432

【讨论】:

  • 工作正常,您甚至可能不需要获得remi.repo,因为我在使用rpm 后发现了freetds.repo
  • 甚至 rpmforge repo 在 0.91 之前也只有 freetds(参见:pkgs.repoforge.org/freetds
  • Wehn 我试试这个我得到以下Loaded plugins: amazon-id, rhui-lb, search-disabled-repos remi-safe | 2.9 kB 00:00:00 remi-safe/7Server/primary_db | 1.3 MB 00:00:00 No package freetds available. 所以它不起作用。有任何想法吗?另外,我使用的是repoforge.org/userepoforge.org/use 的 EL7,而不是您的第一个 URL,这可能是问题吗?
  • 好像找不到freetds包。您应该打开一个新问题,询问如何安装它,因为听起来您使用的是 AWS/Linux,并且安装过程可能会有所不同。
【解决方案3】:

为我工作

yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

(如果以上不起作用,请尝试检查此页面https://fedoraproject.org/wiki/EPEL#Extra_Packages_for_Enterprise_Linux_.28EPEL.29

然后:

yum install -y freetds freetds-devel

【讨论】:

    猜你喜欢
    • 2016-12-26
    • 2016-10-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-10-08
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多