el="alternate" type="application/rss+xml" title="spacesbrown" href="https://spacesbrown.tistory.com/rss" />

상세 컨텐츠

본문 제목

User Ld_library_path Mac Os

카테고리 없음

by crispenjusmagacu 2021. 5. 27. 05:03

본문

If you intend to use PHP and other tools provided by Zend Server (pear and pecl) from the command line (PHP CLI), it is recommended that you add the <install_path>/bin directory to your $PATH environment variable.

Here is how to save the path of the custom shared library path within the executable during compilation, so that one can execute the binary without setting LDLIBRARYPATH. For Mac OS X, the variable name is DYLDLIBRARYPATH. 2020-2-13  In shell scripts used for unit testing with dynamic libraries in a directory other than the typical @rpath, I have previously been able to set DYLDFALLBACKLIBRARYPATH to set the directory containing the libraries. Under 10.11.1, bash seems to ignore attempts to set this environment variable.

This can be done in two ways:

User Ld_library_path Mac Os 10

  • Per user profile
  • For all users

The following procedure is intended for use with bash. If you are using a different shell, adjust the procedure accordingly.

To add the <install_path>/bin directory to your $PATH environment variable per user profile, issue the following command:

echo 'export PATH=$PATH:/usr/local/zend/bin' >> $HOME/.bashrc

To add the Zend Server library path, issue the following command:

echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/zend/lib' >> $HOME/.bashrc

You can now run the PHP binary provided by Zend Server without typing its full path.

To add the <install_path>/bin directory to your $PATH environment variable for all users, issue the following command:

echo 'export PATH=$PATH:/usr/local/zend/bin' >> /etc/profile.d/zend-server.sh

To add the Zend Server library path, issue the following command:

echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/zend/lib' >> /etc/profile.d/zend-server.sh

You can now run the PHP binary provided by Zend Server without typing its full path.

因为Mac OS X上的bash是通过login的方式运行的,而man bash中写着,通过login方式登录的bash不会读取~/.bashrc。

解决方法:把上面的代码 添加到 ~/.bash_profile中。

User Ld_library_path Mac Os

echo source ~/.bashrc >> ~/.bash_profile

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/zend/lib

echo 'xxxxx'|sudo -S /usr/local/zend/bin/zendctl.sh start

Variables

sudo /usr/local/zend/mysql/bin/mysql.server start

sudo /usr/local/zend/mysql/bin/mysql.server start

sudo /Library/StartupItems/ZendServer_init/ZendServer_init start

User Ld_library_path Mac Os 7

sudo /Library/StartupItems/MySql_init/MySql_init start

mysql 配置在 /usr/local/zend/mysql/data/my.cnf

-----------------------------

修改数据库存储位置

mkdir -p /Volumes/Opt/Var/mysql

mv /usr/local/zend/mysql/data/my.cnf /Volumes/Opt/Var/mysql/

sudo scripts/mysql_install_db --user=zend --datadir=/Volumes/Opt/Var/mysql --basedir=/usr/local/zend/mysql --defaults-file=/Volumes/Opt/Var/mysql/my.cnf

vi /usr/local/zend/mysql/bin/mysql.server

修改datadir = '/Volumes/Opt/Var/mysql'

/usr/local/zend/mysql/bin/mysql.server start

由于mac10.10 已经取消了startitem启动。。所以不能自启动

/Library/StartupItems/MySql_init

/Library/StartupItems/ZendServer_init

参照 : http://pikeralpha.wordpress.com/2014/06/12/yosemite-dp1-removes-systemstarter/

posted @ 2014-08-06 22:12zhepama 阅读(...) 评论(...) 编辑收藏

Configure LD_LIBRARY_PATH (DYLD_LIBRARY_PATH on Mac OS X) environment variable to help library loader finding reloactable libs for your Sublime Text instance, especially to let build tools have custom install configurations.

Install

LD Lib Path has been tested for Sublime Text 3 running on Mac OS X, but I have some confidence that it could work for other combinations like Linux or Sublime Text 2.

submission to Package Control in the works

To manually install LD Lib Path, run

for Sublime Text 2, or

for Sublime Text 3.

Options

Ld_library_path

You can optionally set the following option to your user preferences:

  • 'ld_library_path_items': []

    An array of strings of locations you wish to add to Sublime Text's library paths.

    For example, to add /srv/lib and /opt/local/lib to the library path in Sublime Text, you would use 'ld_library_path_items': ['/srv/lib', '/opt/local/lib'].

Mac Os Download

Credits

Pip User Path

Thanks to Matt Torok for the code is largely inspired from Fix Mac Path

댓글 영역