doc-exports/docs/fg/umn/functiongraph_03_0830.html
Chen, Junjie dac566cf2f FG UMN 20230725 version
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com>
Co-authored-by: Chen, Junjie <chenjunjie@huawei.com>
Co-committed-by: Chen, Junjie <chenjunjie@huawei.com>
2024-04-03 10:30:56 +00:00

24 lines
3.2 KiB
HTML

<a name="functiongraph_03_0830"></a><a name="functiongraph_03_0830"></a>
<h1 class="topictitle1">How Can I Create an ODBC Drive-based Python Dependency Package for Database Query?</h1>
<div id="body0000001229606519"><p id="functiongraph_03_0830__p8251191811217">For OS-dependent packages (for example, unixODBC), download the source code to compile dependency packages.</p>
<ol id="functiongraph_03_0830__ol4893428142111"><li id="functiongraph_03_0830__li1555614065913">Log in to your ECS on the ECS console (ensure that the GCC and Make tools have been installed), and run the following command to download the source code package:<pre class="screen" id="functiongraph_03_0830__screen1993193514286">wget <em id="functiongraph_03_0830__i574919304395">source code path</em></pre>
<p id="functiongraph_03_0830__p177324812811">If you downloaded a <strong id="functiongraph_03_0830__b10904111013915">.zip</strong> file, run the following command to decompress it:</p>
<pre class="screen" id="functiongraph_03_0830__screen2732784282">unzip xxx/xx.zip </pre>
<p id="functiongraph_03_0830__p67321887289">If you downloaded a <strong id="functiongraph_03_0830__b8295105103914">tar.gz</strong> file, run the following command to decompress it:</p>
<pre class="screen" id="functiongraph_03_0830__screen1773218182820">tar -zxvf xxx/xx.tar.gz</pre>
</li><li id="functiongraph_03_0830__li6282432135917">Run the following command to create the <strong id="functiongraph_03_0830__b84235270621425">/opt/function/code</strong> directory:<pre class="screen" id="functiongraph_03_0830__screen208041241827">mkdir /opt/function/code</pre>
</li><li id="functiongraph_03_0830__li10881102783218">Go to the destination directory and run the following command:<pre class="screen" id="functiongraph_03_0830__screen293283883211">./configure --prefix=/opt/function/code --sysconfdir=/opt/function/code;make;make install</pre>
</li><li id="functiongraph_03_0830__li1241813532328">Go to <strong id="functiongraph_03_0830__b1324213152511">/opt/function/code/lib/pkgconfig</strong> and check whether the prefix directory is <strong id="functiongraph_03_0830__b1488710237256">/opt/function/code</strong>.<pre class="screen" id="functiongraph_03_0830__screen98741328339">cd /opt/function/code/lib/pkgconfig</pre>
</li><li id="functiongraph_03_0830__li1189492822110">Copy all files in <strong id="functiongraph_03_0830__b131521458182417">/opt/function/code/lib</strong> to <strong id="functiongraph_03_0830__b146293162516">/opt/function/code</strong>.<pre class="screen" id="functiongraph_03_0830__screen4605535143412">cp -r /opt/function/code/lib/* /opt/function/code</pre>
</li><li id="functiongraph_03_0830__li989412812218">Switch to <strong id="functiongraph_03_0830__b08459292253">/opt/function/code</strong> and compress all files in it to a <strong id="functiongraph_03_0830__b202101413183215">.zip</strong> package.<pre class="screen" id="functiongraph_03_0830__screen1038610533345">cd /opt/function/code </pre>
<pre class="screen" id="functiongraph_03_0830__screen19779131963515">zip -r xxx.zip *</pre>
</li></ol>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="functiongraph_03_0110_00.html">General FAQs</a></div>
</div>
</div>