问题
Jekyll Installation says:
GCC and Make (in case your system doesn’t have them installed, which you can check by running gcc -v and make -v in your system’s command line interface)
I am using macOS Sierra. And I have installed Command Line Tools (CLT) for Xcode. And gcc -v
produces:
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
It means that I have clang installed. Do I still need to install GCC?
回答1:
Usually you set this:
CC=clang
回答2:
It looks like I was wrong ;)
You don't have to install GCC.
It should be enough to:
1. Install Ruby
I prefer to install from sources: https://cache.ruby-lang.org/pub/ruby/2.4/ruby-2.4.1.tar.gz
> ./configure --prefix=$HOME/opt/ruby
> make
> make install
2. Install RubyGems
Again, I prefer to install from sources: https://rubygems.org/pages/download
> export PATH=$HOME/opt/ruby/bin:$PATH
> ruby setup.rb
3. Change repo location
I don't compile Ruby with ssh. In that case, I have to change the ruby gems repo
> gem sources -r https://rubygems.org/
> gem sources -a http://rubygems.org/
(if you want to build with OpenSSL, take a look here: http://www.owsiak.org/?p=3262 There is a sample related to building OpenSSL at macOS)
4. You can install Jekyll
> gem install jekyll
> jekyll --version
jekyll 3.5.2
That's it.
回答3:
A lot of people (who are not using Linux) are having trouble with setting up Jekyll. If you want no problems, you can also use Cloud9 for Jekyll. Cloud9 is an online virtual Linux environment (and IDE).
The steps are:
- create a free account on Cloud9
- create an empty project (Ubuntu)
- type on the Cloud9 terminal: gem install jekyll
- create an empty _config.yml file in the project root
- create a index.md file in the project root
- type on the Cloud9 terminal: jekyll serve –host $IP –port $PORT –baseurl ''
- your (very basic) website is now running ‘locally’ on Cloud9 and can be accessed by clicking 'Preview Running Application'
I created an archive with some Jekyll scripts to get going. You can find it on jekyllcodex.org.
来源:https://stackoverflow.com/questions/46019526/does-the-installation-of-jekyll-need-gcc-on-osx