使用 setup.py 文件我给出自定义命令,例如
CUSTOM_COMMANDS = [
['sudo','apt-get', 'update'],
['sudo','mkdir','-p','/opt/oracle'],
['sudo','apt-get','--assume-yes','install','unzip'],
['wget','https://storage.googleapis.com/facbeambucketv1/files/instantclient-basic-linux.x64-18.3.0.0.0dbru.zip'],
['sudo','unzip','-o', 'instantclient-basic-linux.x64-18.3.0.0.0dbru.zip', '-d' ,'/opt/oracle'],
['sudo','unzip','-o', 'instantclient-basic-linux.x64-18.3.0.0.0dbru.zip'],
['sudo','apt-get','--assume-yes','install','libaio1'],
['sudo', 'touch', '/etc/environment'],
['export', 'LD_LIBRARY_PATH=/opt/oracle/instantclient_18_3']
]
除了最后一行给出错误目录之外,一切正常...为了确认我之前使用过 tree 命令并且目录存在 /opt/oracle/instantclient_18_3