# Troubleshooting “Cannot Find Library File: System.Data.CData.OracleOCIw.dll" Error on Linux/Ubuntu

**URL:** <https://community.cdata.com/t/troubleshooting-cannot-find-library-file-system-data-cdata-oracleociw-dll-error-on-linux-ubuntu/779>\
**Category:** Data Sources\
**Tags:** article, oracle, connect-server\
**Created:** [June 11, 2024, 3:20pm UTC](https://community.cdata.com/t/troubleshooting-cannot-find-library-file-system-data-cdata-oracleociw-dll-error-on-linux-ubuntu/779 "2024-06-11T15:20:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tapan18118](https://avatars.discourse-cdn.com/v4/letter/t/b9bd4f/32.png) [@Tapan18118](https://community.cdata.com/u/Tapan18118)\
**Post date:** [June 11, 2024, 3:20pm UTC](https://community.cdata.com/t/troubleshooting-cannot-find-library-file-system-data-cdata-oracleociw-dll-error-on-linux-ubuntu/779/1 "2024-06-11T15:20:01Z")

</div>

This article contains detailed steps for resolving the mentioned error that most of our customers face as they download the Oracle driver. This specifically focuses on Connect Servers installation on Linux systems (Ubuntu)

Typically, the OCI files are automatically downloaded when you install the Oracle Connector within Connect Server. These files are usually located in _ **Home/opt/cdata/connect/lib** _, depending on where you extracted the folder on your Linux system.

 ![f7cc6063-18f6-470f-ade1-cba5d6c50aa5.png](https://us1.discourse-cdn.com/cdata/original/2X/c/caf97ee9cb849048987ee0630068e74dfe11e258.png)

Please note that inside this folder, there are two different directories: **x64** and **x86**. Be sure to copy the path to the appropriate directory. For instance, in my case, it is _ **Home/opt/cdata/connect/lib/x64**._

 ![0048cfd8-9a8b-4ba9-8fc8-099ce335c8d2.png](https://us1.discourse-cdn.com/cdata/original/2X/7/728a8137ebb023ee5cd64573902cfaeca138d7e4.png)

**\*\*Note: \*\*** _It is important to extract these folders inside_ _ **/opt/cdata/connect** __, as placing them elsewhere can sometimes cause permission issues when running the application as a service._

Once you have copied the path, you need to save it as an **LD\_LIBRARY\_PATH** on your Linux system.

Depending on how you are running the application, this LD\_LIBRARY\_PATH must be specified in two different files:

**A. Running as a Process** – Add the path inside the **._bashrc_** file.

**B. Running as a Service** – Add the path inside the _ **cdata-connect.service** _ file for the user running the service.

I have detailed the entire process of adding this path for both cases below.

**Running as a Process:**

**First** , access the .bashrc file located in the home directory of the root user. You can do this by running the command _ **vim ~/.bashrc** _ in the terminal. Once the file is open, add the **LD\_LIBRARY\_PATH** as shown below and in the screenshot:

_ **export LD\_LIBRARY\_PATH=/home/rohit/Downloads/CDataConnect/lib/Oracle0ci/x64** _

 ![0e3fc438-a3bb-42a3-883e-d3b92ddf4161.png](https://us1.discourse-cdn.com/cdata/original/2X/4/4ccb4a5e786449a5396af761633f129a7245ba0c.png)

Second, after adding the path, reload the .bashrc file for the current shell session using the command&nbsp; _ **source ~/.bashrc** _ This will apply the changes without needing to close and reopen the terminal.

Lastly, open the application using the following command :_ **java -jar connect.jar -f service.json** __._

**NOTE** : _There are some additional aspects that a user needs to make sure during this entire process:_

_1._ _the application should be closed while updating the_ _ **.bashrc** _ _file_

_2. Access the application as a root user to ensure you have the necessary access rights and permissions._

**Running as a Service.**

When running the application as a service, first ensure that you have created a daemon for your service by executing the _ **bash ./service** _ command, which will create a daemon called _ **cdata-connect.service** _

For more information on the same, please refer to the **“Running Connect as a Service”** : [https://cdn.cdata.com/help/BWH/connect/Starting-Server.html#running-connect-as-a-service](https://cdn.cdata.com/help/BWH/connect/Starting-Server.html#running-connect-as-a-service)

This file is typically located at _/etc/system/system/cdata-connect.service_

Once created, open the _ **cdata-connect.service** _ file and add the _ **LD\_LIBRARY\_PATH** _ as an Environment variable under the **Service** section as follows:

_ **Environment=”LD\_LIBRARY\_PATH=/opt/cdata/connect/lib/OracleOci/x64”** _

 ![f3a79b88-5c1b-4d3d-9459-a80138e6928f.png](https://us1.discourse-cdn.com/cdata/original/2X/9/9349fec11c48cb431c4e0ebe99b85a06002a2a5a.png)

Once done, reload the daemon using the _` **systemctl daemon-reload** _` command. Finally, restart the service, and the error should be resolved.

Hope this helps!
