Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation failed either with sudo or without sudo #213

Closed
saefulrahman opened this issue Jul 13, 2021 · 2 comments
Closed

Installation failed either with sudo or without sudo #213

saefulrahman opened this issue Jul 13, 2021 · 2 comments

Comments

@saefulrahman
Copy link

Can someone help me to install v2ray on Linux Mint 20.1 ?

OS : Linux Mint 20.1 "Ulyssa" - Xfce (64-bit)
Terminal : Oh My Zsh

I'm trying to install using v2ray on Linux Mint 20.1. I tried using sudo and without sudo, same result. Here's the log:

➜ sudo bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dloadbash: /proc/self/fd/15: No such file or directory
  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0%                                                                  
~ 
 23 21647   23  4998    0     0  12371      0  0:00:01 --:--:--  0:00:01 12340
curl: (23) Failed writing body (476 != 1378)


~ 
➜ bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)     
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 21647  100 21647    0     0  77866      0 --:--:-- --:--:-- --:--:-- 77866
WARNING: The user currently executing this script is not root. You may encounter the insufficient privilege error.
Are you sure you want to continue? [y/n] y
Continuing the installation with current user...
info: Installing V2Ray v4.40.1 for x86_64
Downloading V2Ray archive: https://github.com/v2fly/v2ray-core/releases/download/v4.40.1/v2ray-linux-64.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   626  100   626    0     0   2641      0 --:--:-- --:--:-- --:--:--  2641
100 12.3M  100 12.3M    0     0   912k      0  0:00:13  0:00:13 --:--:-- 1116k
Downloading verification file for V2Ray archive: https://github.com/v2fly/v2ray-core/releases/download/v4.40.1/v2ray-linux-64.zip.dgst
info: Extract the V2Ray package to /tmp/tmp.jbi9Wffbqq and prepare it for installation.
install: cannot create regular file '/usr/local/bin/v2ray': Permission denied
install: cannot create regular file '/usr/local/bin/v2ctl': Permission denied
install: cannot change permissions of ‘/usr/local/share/v2ray’: No such file or directory
install: cannot create regular file '/usr/local/share/v2ray/geoip.dat': No such file or directory
install: cannot create regular file '/usr/local/share/v2ray/geosite.dat': No such file or directory
install: cannot change permissions of ‘/usr/local/etc/v2ray’: No such file or directory
/proc/self/fd/15: line 341: /usr/local/etc/v2ray/config.json: No such file or directory
install: cannot change owner and permissions of ‘/var/log/v2ray/’: No such file or directory
install: cannot create regular file '/var/log/v2ray/access.log': No such file or directory
install: cannot create regular file '/var/log/v2ray/error.log': No such file or directory
install: cannot create regular file '/etc/systemd/system/v2ray.service': Permission denied
install: cannot create regular file '/etc/systemd/system/v2ray@.service': Permission denied
mkdir: cannot create directory ‘/etc/systemd/system/v2ray.service.d’: Permission denied
mkdir: cannot create directory ‘/etc/systemd/system/v2ray@.service.d/’: Permission denied
/proc/self/fd/15: line 391: /etc/systemd/system/v2ray.service.d/10-donot_touch_single_conf.conf: No such file or directory
/proc/self/fd/15: line 397: /etc/systemd/system/v2ray@.service.d/10-donot_touch_single_conf.conf: No such file or directory
info: Systemd service files have been installed successfully!
warning: The following are the actual parameters for the v2ray service startup.
warning: Please make sure the configuration file path is correctly set.
# config file /etc/systemd/system/v2ray.service not found

installed: /usr/local/bin/v2ray
installed: /usr/local/bin/v2ctl
installed: /usr/local/share/v2ray/geoip.dat
installed: /usr/local/share/v2ray/geosite.dat
installed: /usr/local/etc/v2ray/config.json
installed: /var/log/v2ray/
installed: /var/log/v2ray/access.log
installed: /var/log/v2ray/error.log
installed: /etc/systemd/system/v2ray.service
installed: /etc/systemd/system/v2ray@.service
removed: /tmp/tmp.jbi9Wffbqq
info: V2Ray v4.40.1 is installed.
You may need to execute a command to remove dependent software: apt purge curl unzip
Please execute the command: systemctl enable v2ray; systemctl start v2ray

You can see the file couldn't be created due to permissions issues. I tried with sudo the result is error.

@IceCodeNew
Copy link
Collaborator

Hi @saefulrahman , would you please try issuing the following command?

curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh | sudo bash

@saefulrahman
Copy link
Author

Hi @saefulrahman , would you please try issuing the following command?

curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh | sudo bash

You saved me, thank you brother. Now, I can use v2ray

info: Installing V2Ray v4.40.1 for x86_64
Downloading V2Ray archive: https://github.com/v2fly/v2ray-core/releases/download/v4.40.1/v2ray-linux-64.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   626  100   626    0     0    541      0  0:00:01  0:00:01 --:--:--   540
100 12.3M  100 12.3M    0     0   253k      0  0:00:49  0:00:49 --:--:--  470k
Downloading verification file for V2Ray archive: https://github.com/v2fly/v2ray-core/releases/download/v4.40.1/v2ray-linux-64.zip.dgst
info: Extract the V2Ray package to /tmp/tmp.AVkrthnyd8 and prepare it for installation.
info: Systemd service files have been installed successfully!
warning: The following are the actual parameters for the v2ray service startup.
warning: Please make sure the configuration file path is correctly set.
# /etc/systemd/system/v2ray.service
[Unit]
Description=V2Ray Service
Documentation=https://www.v2fly.org/
After=network.target nss-lookup.target

[Service]
User=nobody
CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
NoNewPrivileges=true
ExecStart=/usr/local/bin/v2ray -config /usr/local/etc/v2ray/config.json
Restart=on-failure
RestartPreventExitStatus=23

[Install]
WantedBy=multi-user.target

# /etc/systemd/system/v2ray.service.d/10-donot_touch_single_conf.conf
# In case you have a good reason to do so, duplicate this file in the same directory and make your customizes there.
# Or all changes you made will be lost!  # Refer: https://www.freedesktop.org/software/systemd/man/systemd.unit.html
[Service]
ExecStart=
ExecStart=/usr/local/bin/v2ray -config /usr/local/etc/v2ray/config.json

installed: /usr/local/bin/v2ray
installed: /usr/local/bin/v2ctl
installed: /usr/local/share/v2ray/geoip.dat
installed: /usr/local/share/v2ray/geosite.dat
installed: /usr/local/etc/v2ray/config.json
installed: /var/log/v2ray/
installed: /var/log/v2ray/access.log
installed: /var/log/v2ray/error.log
installed: /etc/systemd/system/v2ray.service
installed: /etc/systemd/system/v2ray@.service
removed: /tmp/tmp.AVkrthnyd8
info: V2Ray v4.40.1 is installed.
You may need to execute a command to remove dependent software: apt purge curl unzip
Please execute the command: systemctl enable v2ray; systemctl start v2ray

~ took 18m 48s 
➜ sudo systemctl start  v2ray 

~ 
➜ sudo systemctl status  v2ray
● v2ray.service - V2Ray Service
     Loaded: loaded (/etc/systemd/system/v2ray.service; disabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/v2ray.service.d
             └─10-donot_touch_single_conf.conf
     Active: active (running) since Thu 2021-07-15 23:01:37 WIB; 5s ago
       Docs: https://www.v2fly.org/
   Main PID: 162757 (v2ray)
      Tasks: 9 (limit: 9301)
     Memory: 5.1M
     CGroup: /system.slice/v2ray.service
             └─162757 /usr/local/bin/v2ray -config /usr/local/etc/v2ray/config.json

Jul 15 23:01:37 OWLONE-PC systemd[1]: Started V2Ray Service.
Jul 15 23:01:37 OWLONE-PC v2ray[162757]: V2Ray 4.40.1 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.16.5 linux/amd64)
Jul 15 23:01:37 OWLONE-PC v2ray[162757]: A unified platform for anti-censorship.
Jul 15 23:01:37 OWLONE-PC v2ray[162757]: 2021/07/15 23:01:37 [Info] main/jsonem: Reading config: /usr/local/etc/v2ray/config.json
Jul 15 23:01:37 OWLONE-PC v2ray[162757]: 2021/07/15 23:01:37 [Warning] V2Ray 4.40.1 started

~ 
➜ sudo systemctl stop  v2ray  

~ 
➜ sudo systemctl status  v2ray
● v2ray.service - V2Ray Service
     Loaded: loaded (/etc/systemd/system/v2ray.service; disabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/v2ray.service.d
             └─10-donot_touch_single_conf.conf
     Active: inactive (dead)
       Docs: https://www.v2fly.org/

Jul 14 00:05:35 OWLONE-PC systemd[1]: /etc/systemd/system/v2ray.service:53: Missing '=', ignoring line.
Jul 14 00:05:35 OWLONE-PC systemd[1]: /etc/systemd/system/v2ray.service:54: Unknown key name 'root      2659  2113  0 02:44 pts/1    00:00:00 grep --color' in section 'Service', ignoring.
Jul 15 23:01:37 OWLONE-PC systemd[1]: Started V2Ray Service.
Jul 15 23:01:37 OWLONE-PC v2ray[162757]: V2Ray 4.40.1 (V2Fly, a community-driven edition of V2Ray.) Custom (go1.16.5 linux/amd64)
Jul 15 23:01:37 OWLONE-PC v2ray[162757]: A unified platform for anti-censorship.
Jul 15 23:01:37 OWLONE-PC v2ray[162757]: 2021/07/15 23:01:37 [Info] main/jsonem: Reading config: /usr/local/etc/v2ray/config.json
Jul 15 23:01:37 OWLONE-PC v2ray[162757]: 2021/07/15 23:01:37 [Warning] V2Ray 4.40.1 started
Jul 15 23:01:48 OWLONE-PC systemd[1]: Stopping V2Ray Service...
Jul 15 23:01:48 OWLONE-PC systemd[1]: v2ray.service: Succeeded.
Jul 15 23:01:48 OWLONE-PC systemd[1]: Stopped V2Ray Service.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants