2013-11-24 179 views
9

我试着按照下面的文章中的说明,但它说,无法通过YUM包管理器安装freetds的

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

这是我的I/O “没有包freetds的可用。”:

[[email protected] ~]# 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 
[[email protected] ~]# 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

[[email protected] ~]# 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 
+1

我会尝试'yum安装php-mssql',如果这不起作用,我会看看[这些说明](https://gist.github.com/shf/2052432)。 –

+0

我试过了,现在它似乎说我错过了依赖关系。我可以只做'yum install libsybdb'吗?我不想在提问前尝试,因为没有撤消按钮:) – user1477388

+1

你总是可以卸载的东西。我不知道CentOS - 我很久以前就停止使用RedHat(CentOS基于此) - 所以我无法给出关于如何完成任务的确切说明。如果你在这里找不到更多的帮助,可能会碰到一些CentOS论坛或IRC频道。 –

回答

9

从上面尼山的评论通过,这是什么让安装我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

采纳
+0

工作正常,你可能甚至不需要获得'remi.repo',因为我在使用rpm后找到了'freetds.repo'。 – Mohammad

+0

甚至rpmforge回购只有freetds直到0.91(见:http://pkgs.repoforge.org/freetds/) –

13

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

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 
+1

是的,但只有直到0.91版本 –

相关问题