Can't install

When I run this final command on this page: https://docs.joinpeertube.org/#/install-any-os?id=installation

cd ./peertube-latest && sudo -H -u peertube yarn install --production --pure-lockfile
-bash: cd: ./peertube-latest: No such file or directory

Hello,

Check if the ./peertube-latest exists. Maybe you mispelled its name with the previous commands set.

like this?

cgmnetworktv@https-watch-koinonia-club:/var/www/peertube$ ls
config  peertube-latest  storage  versions

What does a ls -l on the same folder give ? Specifically for peertube-latest

cgmnetworktv@https-watch-koinonia-club:/var/www/peertube$ ls -l
total 12
drwxrwxr-x 2 peertube peertube 4096 Sep 24 03:09 config
lrwxrwxrwx 1 peertube peertube   24 Sep 24 03:11 peertube-latest -> versions/peertube-v2.4.0
drwxrwxr-x 2 peertube peertube 4096 Sep 24 03:09 storage
drwxrwxr-x 3 peertube peertube 4096 Sep 24 03:11 versions

does this folder exist too ?

cgmnetworktv@https-watch-koinonia-club:/var/www/peertube/versions$ ls -ahl
total 12K
drwxrwxr-x 3 peertube peertube 4.0K Sep 24 03:11 .
drwxr-xr-x 5 peertube peertube 4.0K Sep 24 03:11 ..
drwxrwxr-x 7 peertube peertube 4.0K Sep 24 03:11 peertube-v2.4.0

Strange… Obviously, the « No such file or directory » means that the file or folder does not exist, but this means too when the destination of a link (what peertube-latest is) does not exist.

However, this is not your case. A change directory, in my opinion, should work.

What’s wrong, then ?

what’s the result of the command file peertube-latest ?

cgmnetworktv@https-watch-koinonia-club:/var/www/peertube/versions$ file peertube-latest
peertube-latest: cannot open `peertube-latest' (No such file or directory)

within /var/www/peertube, I meant :wink:

cgmnetworktv@https-watch-koinonia-club:/var/www/peertube$ file peertube-latest
peertube-latest: symbolic link to versions/peertube-v2.4.0

You’re more than welcome to log in if you want to see what is going on. I’m using this server to learn how to deploy many more servers.

Well, I cannot imagine what’s wrong.

Where were you when you ran cd ./peertube-latest && sudo -H -u peertube yarn install --production --pure-lockfile ? Were you on /var/www/peertube ?

What about doing cd peertube-latest && sudo -H -u peertube yarn install --production --pure-lockfile ?

cgmnetworktv@https-watch-koinonia-club:/var/www/peertube$ cd ./peertube-latest && sudo -H -u peertube yarn install --production --pure-lockfile
Usage: yarn [options]

yarn: error: no such option: --production
cgmnetworktv@https-watch-koinonia-club:/var/www/peertube/peertube-latest$ sudo -H -u peertube yarn install --production --pure-lockfile ?
Usage: yarn [options]

yarn: error: no such option: --production

OK, that’s another trouble now. You have no more the « no such file or directory ». I guess you were in the wrong place, the first time you ran it.

Now you have a problem with yarn… maybe you’re using Yarn 2 instead of Yarn 1. It seems that there are incompatibilities between both versions.

Everything is possible, yes. I only want to confirm that I followed the instructions precisely. And i don’t recall changing into any other directories during the steps I took to arrive at the last one. Any recommendations or should I just clean the disk and restart?

Which Linux distribution do you use ?

cgmnetworktv@https-watch-koinonia-club:/var/www/peertube/peertube-latest$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.1 LTS
Release:        20.04
Codename:       focal

what does the command yarn version return ?