2013-11-24 219 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版本 –

相關問題