"mkdir: cannot create directory ‘/opt/anaconda’:Permission denied"

Feyre

I just installed Ubuntu. I downloaded the anaconda python package and am trying to install it,

bash Anaconda-2.1.0-Linux-x86_64.sh

at some point the terminal says:

Anaconda will now be installed into this location:
/home/*username*/anaconda

  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify an different location below

So I wanted to install in /opt (which I heard was an appropriate directory), but the terminal then says:

mkdir: cannot create directory ‘/opt/anaconda’:Permission denied
ERROR: Could not create directory: /opt/anaconda

I don't see how I can use sudo here as the installer runs then mkdir. I tried making the directory myself first, bit then it gives the fact that the dir exists as an error. What can I do?

Braiam

So I wanted to install in /opt

The /opt directory is root owned, normal users can't write in it. As long as you tell anaconda that you want to install in directories that non-root users cannot write, you must use elevated privileges. When you start the installer, you must use sudo from the start:

sudo bash Anaconda-2.1.0-Linux-x86_64.sh
[...]
Anaconda will now be installed into this location:
/home/user/anaconda

  - Press ENTER to confirm the location
  - Press CTRL-C to abort the installation
  - Or specify an different location below

[/home/user/anaconda] >>> /opt/anaconda

Anaconda doesn't write anything before that, so you can rest assured.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Why does 11010100 << 1 equal 110101000, not 10101000?

Odd Java ternary behavior when assigning value. What is Java doing behind the scenes for this to happen?

Java 8 - How to get single values out of Map of Lists?

How to solve x - a tan(x) = 0 with Sympy

Spring @Transactional is consistantly rolling back transaction upon exception

Basic mySQL - Don't know how to show all results including 0

How can I refresh a page with jQuery?

C++ and Java array declaration/definition : differences

Spring security switch to Ldap authentication and database authorities

Multi language database, with default fallback

How to detect string which contains only spaces?

Change value in a 2-value column to its opposite only if a condition in another column is met

Protocol Buffer Error version

Move constructor C++11

qml virtual keyboard: keyboardDesignWidth and Height

Create a bot for a closed facebook group

align items vertically in rowlayout

eigen: Subtracting a scalar from a vector

Risk and effects of changing database collation in SQL Server

QML error on exposing child properties

clipping a voronoi diagram python

Resetting a QML StackView to initial state

function annotations in python

Monte Carlo Simulation Fails to Recognize Connected Graph

QML accessing your qml component

ERR_CONNECTION_TIMED_OUT with google apis fonts

Is searchsorted faster than get_loc to find label location in a DataFrame Index?

VLOOKUP within IMPORTRANGE

How to join two pandas Series into a single one with interleaved values?

Extract hyper-cubical blocks from a numpy array with unknown number of dimensions