Unable to install Couchbase sync gateway

Hi,

I am trying to install Couchbase sync gateway using the steps from the following URL for MacOS
https://developer.couchbase.com/documentation/mobile/current/installation/sync-gateway/index.html

This issue is, i downloaded “couchbase-sync-gateway-enterprise_1.4.1-3_x86_64.tar.gz” and its in “Downloads” folder in MacBook.

When I execute this command -> sudo tar -zxvf couchbase-sync-gateway-enterprise_1.4.1-3_x86_64.tar.gz --directory /opt

[MyMacbook:downloads administrator$ sudo tar -zxvf couchbase-sync-gateway-enterprise_1.4.1-3_x86_64.tar.gz --directory /opt

tar: could not chdir to ‘/opt’]

Throws error as “tar: could not chdir to ‘/opt’”

I don’t understand how to resolve this. I couldn’t get help anywhere.

Please help installing Couchbase sync gateway successfully on MacBook.

this is a OS error, do you have a directory named /opt?
may be you should change a directory, such as /tmp

@jongladwin

I tried the same command on my macBookPro and I can not reproduce the error you experienced:

sudo tar -zxvf couchbase-sync-gateway-enterprise_1.4.1-3_x86_64.tar.gz --directory /opt

The permissions on my /opt directory are:

drwxr-xr-x@ 7 root wheel 238 25 Apr 18:44 /opt

macOS version: 10.12.1

The user account that I am using to run the command has Admin privileges on my machine.

Andy

Thanks. I didn’t have /opt folder by default in my macbook. I created the folder now and then able to execute the command.