在Mac OS上安装Tidy-html5:如何安装

17

请帮忙。

我需要在 Mac OS 上安装 HTML tidy。 http://w3c.github.com/tidy-html5/

我在终端中运行命令,但没有任何反应:

$ make -C build/gmake/
make: *** build/gmake/: No such file or directory.  Stop.

$ sh build/gnuauto/setup.sh && ./configure && make
sh: build/gnuauto/setup.sh: No such file or directory

有什么问题吗?我还需要安装什么吗?

6个回答

26

以下方法对我有效:

brew update
brew install tidy-html5

Shell输出:

➜  ~  brew install tidy-html5
==> Downloading https://homebrew.bintray.com/bottles/tidy-html5-4.9.26.yosemite.
######################################################################## 100.0%
==> Pouring tidy-html5-4.9.26.yosemite.bottle.tar.gz
  /usr/local/Cellar/tidy-html5/4.9.26: 8 files, 1.2M

4
这是现在正确的答案,其他的已经过时了。 - o0'.
1
谢谢您提出这个问题!@Vladimir,如果这个方法对您有用,请标记答案为正确答案! - Sagar Ranglani

15

tidy-html5已升级为稳定版本,所以您只需要在安装了最新版Homebrew的环境中运行以下命令:

$ brew install tidy-html5

2
如果已经安装了Tidy,请不要忘记先运行“brew unlink tidy”。 - mynameistechno
使用“--HEAD”安装对我来说有效。唯一需要注意的是,“tidy”最终会安装在“/usr/local/bin/tidy5”。感谢@PedroRomano。 - James Conroy-Finn
"tidy-html5"已经升级为稳定版本,因此答案已相应更新。 - Pedro Romano

5

这方法对我没用,但是下面是成功的方法:

点击重复存储库:

brew tap homebrew/dupes

Homebrew dupes仓库包含重复OS X提供的软件的公式,尽管可能提供更新或修复版本。

然后从dupes仓库安装:

brew install tidy --HEAD

try brew install tidyp - chovy
这个答案是正确的解决方案,不确定为什么被投票否定了。 - Nick Zalutskiy
tidyp 不支持验证 HTML 5。 - Nick Zalutskiy

2
安装tidy5,这是适用于OS X的最新版本Tidy:
确保您已安装Homebrew
然后,点击dupes存储库,该存储库提供了适用于OS X系统提供的软件的新版本/错误修复的brew配方。
$ brew tap homebrew/dupes

安装Tidy(tidy-html5)
$ brew install --HEAD tidy

解锁dupes存储库。
$ brew untap homebrew/dupes

调用
$ tidy5 -v  
> HTML Tidy for Mac OS X version 5.4.0

当我运行 $ brew install --HEAD tidy 时,安装到了 ==> make install 步骤,但在下面的错误上中断:Error: parent directory is world writable but not sticky - 有任何想法吗?我甚至不确定它指的是哪个目录。 - Ed B

1

我刚刚在Mac OS X 10.9.1中安装了Tidy:

brew install tidy

它将自动安装其依赖项:automake和libtool。
您可能会注意到,我有一个默认的整洁程序在/usr/bin/tidy下,它有一个版本:
HTML Tidy for Mac OS X released on 31 October 2006 - Apple Inc. build 15.12
安装Homebrew后,版本显示为:
HTML Tidy for Mac OS X released on 25 March 2009,
路径为:/usr/local/Cellar/20090325/bin/tidy。

哦,糟糕了,我忘记更新我的$PATH,所以它选择了/usr/bin/tidy而不是/usr/local/Cellar/tidy-html5/5.4.0/bin/tidy - Sridhar Sarnobat

0
问题在于文档没有提到您必须进入bundle目录才能运行第一个命令。给出的命令是相对于bundle目录的。
我昨天成功完成的步骤:
cd ~/Library/Application Support/Avian/Pristine Copy/Bundles git clone https://github.com/w3c/tidy-html5 cd tidy-html5/ sudo make -C build/gmake/ sudo make install -C build/gmake/
关于共享库部分不确定,因为我没有经历过这些步骤。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接