Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MacOS 的编译和运行遇到缺少库时的解决方案 #24

@evpeople

Description

@evpeople

将下载好的librime放到相应位置后

export LIBRIME_LIB_DIR= /usr/local/lib
export LIBRIME_INCLUDE_DIR= /usr/local/include
cargo build --release

之后运行会遇到

dyld[46557]: Library not loaded: @rpath/librime.1.dylib
  Referenced from: <1378A569-3C10-3E64-9374-B718D98D94AB> /Users/evpeople/code/rust/rime-ls/target/release/rime_ls
  Reason: no LC_RPATH's found

此时要做的是

export DYLD_LIBRARY_PATH=/usr/local/lib  # 最好放在.zshrc中

此时可以运行了,但是会因权限报错,这时就是去系统设置解决权限问题了

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions