Raghavendra S S
Raghavendra S S

Reputation: 115

unable to install python 3.6 on linux

I run below commands after unzipping that python 3.6 tar.xz file.

./configure
make
make install

Error log:

ranlib libpython3.6m.a
gcc -pthread   -Xlinker -export-dynamic -o python Programs/python.o libpython3.6m.a -lpthread -ldl  -lutil -lrt   -lm  
if test "no-framework" = "no-framework" ; then \
        /usr/bin/install -c python /usr/local/bin/python3.6m; \
    else \
        /usr/bin/install -c -s Mac/pythonw /usr/local/bin/python3.6m; \
    fi
/usr/bin/install: cannot create regular file `/usr/local/bin/python3.6m': Read-only file system
make: *** [altbininstall] Error 1

When i run ./configure followed by make , and then make install i run into this error!

Upvotes: 1

Views: 2776

Answers (3)

H. Gourlé
H. Gourlé

Reputation: 894

Your filesystem seems to be read-only. You have to remount the partition where /usr/local/bin/ is located with write permissions

The syntax for mount is

mount -o remount,rw /partition/identifier /mount/point

Let's say you have / on /dev/sda2

mount -o remount,rw / /dev/sda2

should fix your problem.

To check your mount points: cat /etc/fstab or df

To check the permissions: cat /proc/mounts

Upvotes: 1

Lijo Joseph
Lijo Joseph

Reputation: 4702

Try after installing build essentials whic contains compilers,package dev tools and libs: sudo apt-get install build-essential

Upvotes: 0

Sreetam Das
Sreetam Das

Reputation: 3409

Have you tried running the above commands using sudo powers?

original answer: https://askubuntu.com/q/865554/667903

sudo make install

or

If you are using Ubuntu 16.10 or 17.04, then Python 3.6 is in the universe repository, so you can just run

sudo apt-get update
sudo apt-get install python3.6

Upvotes: 1

Related Questions