12

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

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

This is my 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!

Edit:

After 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
user1477388
  • 20,790
  • 32
  • 144
  • 264
  • 1
    I would try `yum install php-mssql` and if that doesn't work I'd take a look at [these instructions](https://gist.github.com/shf/2052432). – Benny Hill Nov 24 '13 at 19:31
  • I tried that now it seems to say I am missing a dependency. Can I just do `yum install libsybdb`? I don't want to try before asking because there's no undo button :) – user1477388 Nov 24 '13 at 19:42
  • 1
    You can always uninstall things. I don't know CentOS - I stopped using RedHat (which CentOS is based on) a long time ago - so I can't give you exact directions on how to accomplish your task. If you can't find more help here, perhaps hit some CentOS forums or IRC channels. – Benny Hill Nov 25 '13 at 00:38
  • Okay, I got it. Thanks for that link, that's what helped me most :) – user1477388 Nov 26 '13 at 01:29

3 Answers3

19

If you don't want to use the RPM Forge packages, freetds and php-mssql are also available in 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
Geoff Montee
  • 2,587
  • 13
  • 14
11

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

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

user1477388
  • 20,790
  • 32
  • 144
  • 264
  • Works fine, you might not even need to get `remi.repo` as I found a `freetds.repo` after using rpm. – Mo Beigi Dec 18 '15 at 12:44
  • even rpmforge repo only have freetds until 0.91 (see: http://pkgs.repoforge.org/freetds/) – Fernando Fabreti May 18 '16 at 14:11
  • Wehn I try this I get the following `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.` so it doesn't work. Any ideas? Also instead of your first URL I used the EL7 from here http://repoforge.org/use/ is that the problem maybe? – Dan Jul 18 '18 at 14:17
  • Sounds like it can't find the freetds package. You should open a new question asking how to install it as it sounds like you are using AWS/Linux and the install process could be different. – user1477388 Jul 18 '18 at 16:56
4

Worked for me

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

(if above doesn't work, try to check this page https://fedoraproject.org/wiki/EPEL#Extra_Packages_for_Enterprise_Linux_.28EPEL.29)

And then:

yum install -y freetds freetds-devel
val.sytch
  • 231
  • 3
  • 8