Linux 无法通过 Yum 包管理器安装 FreeTDS

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20179649/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-07 01:27:10  来源:igfitidea点击:

Can't Install FreeTDS via Yum Package Manager

linuxcentospleskyumfreetds

提问by user1477388

I tried following the instructions in the article below but it says, "No package freetds available."

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

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

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

This is my I/O:

这是我的 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

How can I install freetds? I am just trying to connect to SQL Server!

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

Edit:

编辑:

After yum install php-mssql:

之后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

采纳答案by user1477388

As adopted from Benny Hill's comment above, this is what got freetds installed for me:

正如上面 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

Adopted from https://gist.github.com/shf/2052432

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

回答by Geoff Montee

If you don't want to use the RPM Forge packages, freetdsand php-mssqlare also available in EPEL.

如果你不想使用RPM包锻造,freetds并且php-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