【问题标题】:'libxml/xmlwriter.h' not found after updating to Xcode 7.0.1 and El Capitan更新到 Xcode 7.0.1 和 El Capitan 后找不到“libxml/xmlwriter.h”
【发布时间】:2015-10-19 15:16:30
【问题描述】:

我刚刚将我的 MacBook 更新为 El Capitan,而我现在有了 Xcode 7.0.1。编译我的 NS-3 脚本时,我收到以下错误(更新之前我没有):

 In file included from ../src/config-store/model/config-store.cc:11:
    ../src/config-store/model/xml-config.h:5:10: fatal error: 'libxml/xmlwriter.h' file not found
    #include <libxml/xmlwriter.h>
             ^
    1 error generated.
    Waf: Leaving directory `/Users/marcogiordani/final-ns3-mmwave-dir/build'
    Build failed
     -> task in 'ns3-config-store' failed (exit status 1): 
        {task 4469735696: cxx config-store.cc -> config-store.cc.1.o}
    ['/usr/bin/g++', '-Wall', '-Werror', '-Wno-potentially-evaluated-expression', '-Wno-unused-local-typedefs', '-fPIC', '-I.', '-I..', '-I/usr/include/libxml2', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_NET_ETHERNET_H=1', '-DHAVE_SQLITE3=1', '../src/config-store/model/config-store.cc', '-c', '-o', 'src/config-store/model/config-store.cc.1.o']

对这个问题有什么建议吗?

【问题讨论】:

    标签: xml xcode7 osx-elcapitan ns-3


    【解决方案1】:

    使用 macOS Mojave 对此进行更新:使用 xcode-select --install 安装两个 CLI 工具和使用 brew 安装 libxml2 / libxslt 后,我​​仍然遇到问题。 解决问题的唯一方法是安装缺少的旧标头,如下所示:https://silvae86.github.io/sysadmin/mac/osx/mojave/beta/libxml2/2018/07/05/fixing-missing-headers-for-homebrew-in-mac-osx-mojave.html

    只需运行 sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target / 就这样!

    【讨论】:

      【解决方案2】:

      它可能关心的人,我刚刚通过在终端上输入解决了这个问题:

      xcode-select —-install
      

      由于某种原因,在更新到 Xcode 7.0.1 时,CommandLineTool 也没有更新,所以我手动进行了更新。现在一切正常。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2016-01-16
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多