sensational / sassphp

PHP bindings to libsass - fast, native Sass parsing in PHP!
Other
229 stars 39 forks source link

Install on CentOS 6.6 #26

Open Dracos85 opened 9 years ago

Dracos85 commented 9 years ago

I just spent a lot of time trying to get this built on CentOS 6.6 and thought I would share how I was finally able to do it with others trying the same.

My company is very very wary of staying on the bleeding edge and only wants to use stable releases of any software. Since the End Of Life for CentOS 6 is 2020, they believe that is the stable version and will not allow any systems using CentOS 7.

The issue is that libsass will not build without GCC 4.6 or greater and CentOS 6.6 comes with GCC 4.4.

After a lot of searching around, I was able to find this post http://ask.xmodulo.com/upgrade-gcc-centos.html on how to upgrade GCC to 4.7 on CentOS 6.6.

Just in case that link goes away, here is the summary of what to do.

$ sudo wget http://people.centos.org/tru/devtools-1.1/devtools-1.1.repo -P /etc/yum.repos.d $ sudo sh -c 'echo "enabled=1" >> /etc/yum.repos.d/devtools-1.1.repo' $ sudo yum install devtoolset-1.1 $ scl enable devtoolset-1.1 bash $ gcc --version

Once you do that, you should see that gcc is version "gcc (GCC) 4.7.2 20121015 (Red Hat 4.7.2-5)".

After doing that, libsass successfully compiled and I was able to complete the install of sassphp.

I hope this helps.

absalomedia commented 9 years ago

As this is a Libsass specific issue and potential duplicate of https://github.com/sass/libsass/issues/1265 could you send your fixes over to them as well?