installing Oracle Instantclient on Mac OS/X without setting environment variables?
Oracle's instructions specify setting DYLD_LIBRARY_PATH. This makes my application dependent on random users' configuration and is very troublesome to set up.
How can I avoid having to set any environment variables?
http://www.oracle.com/technology/software/tech/oci/instantclient/htdocs/intel_macsoft.html
related note for linux: installing Oracle Instantclient on Linux without setting environment variables?
Oracle's instantclient installation instructions specify that the user set DYLD_LIBRARY_PATH. This is very troublesome to manage for multiple users.
To use the instantclient without setting any environment variables:
Download the instantclient distribution from oracle.com. For doing non-java software development, you will need (assuming Oracle 10.2):
instantclient-basic-macosx-10.2.0.4.0.zip
instantclient-sdk-macosx-10.2.0.4.0.zip
instantclient-sqlplus-macosx-10.2.0.4.0.zip
Unzip the three files. This will give you a directory
instantclient_10_2/
Copy the files to /usr, which is one of the default places the dynamic loader searches.
sudo cp instantclient_10_2/sdk/include/*.h /usr/include
sudo cp instantclient_10_2/sqlplus /usr/bin
sudo cp instantclient_10_2/*.dylib /usr/lib
If you use tnsnames.ora, copy it to /etc, which is the default global place the oracle runtime searches.
sudo cp tnsnames.ora /etc
Test with
/usr/bin/sqlplus scott/tiger@myoracle
If your goal is simply to run sqlplus on your MacBook, this might work for you. Remove the DYLD_LIBRARY_PATH environment variable from ~/.bashrc and replace it with an alias:
alias sqlplus="DYLD_LIBRARY_PATH=/Applications/instantclient_11_2 sqlplus"
Blog entry: sqlplus and DYLD_LIBRARY_PATH on Mac OS/X
많은 연구 끝에 저는 이 오류에 대한 지속 가능한 해결책을 찾았습니다. 여기에는 Apache의 오류를 편집하는 작업이 포함됩니다.launchd배열.plist필요한 파일을 지정합니다.DYLD_LIBRARY_PATH,ORACLE_HOME,그리고.LD_LIBRARY_PATH환경 변수.
You can view the full answer here: https://stackoverflow.com/a/20670810/1914455
ReferenceURL : https://stackoverflow.com/questions/684352/installing-oracle-instantclient-on-mac-os-x-without-setting-environment-variable
'programing' 카테고리의 다른 글
| Visual Studio 2010으로 C를 개발하는 방법은? (0) | 2023.10.26 |
|---|---|
| 환경 변수를 설정하지 않고 Mac OS/X에 Oracle Instant 클라이언트를 설치할 수 있습니까? (0) | 2023.10.26 |
| When to use const void*? (0) | 2023.10.26 |
| 빈 패키지 정의(공용 구성원 없음) (0) | 2023.10.26 |
| 실행 중인 도커 컨테이너의 IP 주소를 가져오는 방법 (0) | 2023.10.26 |