Issue with running Ubuntu App on Windows 10 - windows-subsystem-for-linux

Hi I have this problem why following the steps to generate SSL certificate using Letsencrypt here.
However when I run the command ./certbot-auto certonly -a standalone -d example.com -d www.example.com I got this problem:
: not founduto: 13: ./certbot-auto: : not founduto: 15: ./certbot-auto:
I'm sending a snippet for reference:
I would appreciate any help on how to fix this. Thank you.

The fact that the : is at the start of the line indicates you you have CR/LF line endings. You can verify this with od -xcb certbot-auto and checking for the \r\n line endings.
The error message generated would be something like:
./certbot-auto: 13: ./certbot-auto: <cr>: not found
with the bit after the <cr> overwriting the start of the message, making it look like (what you can see):
: not founduto: 13: ./certbot-auto:
So first step is the run something like dos2unix over your shell script and fix the line endings:
dos2unix certbot-auto
That should change the line endings and hopefully make it runnable.

Related

problem trying to initiate a console with WSL 2 in CMDER

I have this error just trying to use WSL from cmder
wslbridge error: failed to start backend process
note: backend error output: -v: -c: line 0: unexpected EOF while looking for matchi ng `''
-v: -c: line 1: syntax error: unexpected end of file
ConEmuC: Root process was alive less than 10 sec, ExitCode=0.
Press Enter or Esc to close console...
does anyone how to solve it?
Create a new profile with the command wsl.exe.
Taken from https://github.com/Maximus5/ConEmu/issues/1930#issuecomment-512882561; it works for me.
For anybody having problems with this, I finally figured it out by setting a new task command of:
wsl.exe ~ -d Ubuntu-20.04
In my case, I had two versions of WSL installed and it wouldn't take the newer in Cmder for anything—it always loaded the ~ directory of my older install. You can use the file browser and go to directory \\wsl$ to see which version of WSL you are using.
I found this solution:
It is a ConEmu thing. The whole WSL part is for WSL version 1, I guess you are running WSL version 2?
You need a new version of cygwin1.dll
Grab one here: https://cygwin.com/snapshots/
Go to vendor\conemu-maximus5\ConEmu\wsl and replace the dll.
You need wslbridge 2:
Grab it here: https://github.com/Biswa96/wslbridge2/releases (the cygwin version)
Copy the content to the same directory: vendor\conemu-maximus5\ConEmu\wsl
Now edit your WSL bash task:
Replace the part "conemu-cyg-64.exe --wsl" with "conemu-cyg-64.exe %ConEmuBaseDirShort%\wsl\wslbridge2.exe"
It works now.

Setting {WSL::Bash} as default shell throws an error in cmder

note: backend error output: -v: -c: line 0: unexpected EOF while looking for matching `''
-v: -c: line 1: syntax error: unexpected end of file
ConEmuC: Root process was alive less than 10 sec, ExitCode=0.
Press Enter or Esc to close console...
This is error i am getting.
Also i have set the fish shell as default shell in WSL.
For WSL1 on windows 10 build later than 1909 (yes wsl2 is available to me but for corporate reasons i cant use it)
Try setting your command to wsl.exe -new_console:d:C:\_stuff\code -cur_console:p5 and the task parameters to /dir "c:/_stuff/code" /icon "c:/_distros/ubuntu/ubuntu1804.exe"
You may need to change the file locations to make the command and parameters suitable for your setup. c:/_stuff/code is where i keep all my repositories and c:/_distros/ubuntu is where i have installed ubuntu.

Can't install phantomjs on server

I'm having a difficult time getting phantomjs installed on my server. I haven't found very good directions anywhere and the best I've found give me errors when I try to complete them. As of now I'm following these steps and getting these errors.
Successfully used putty to login as root and run the following commands
Line 1: yum install fontconfig freetype freetype-devel fontconfig-devel libstdc++
No errors
Line 2: wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.8-linux-x86_64.tar.bz2
No errors
Line 3: mkdir -p /opt/phantomjs
No errors
Line 4: tar -xjvf ~/phantomjs-1.9.8-linux-x86_64.tar.bz2 --strip-components 1 /opt/phantomjs/
Error: opt/phantomjs: Not found in archive
For this error (line 4) I ftp into my server and didn't see any directory for opt/phantomjs. I created one but am having the same "Not found in archive" error.
After this the only other lines of code, from what I've found, should be:
Line 5: ln -s /opt/phantomjs/bin/phantomjs /usr/bin/phantomjs
Line 6: phantomjs /opt/phantomjs/examples/hello.js
If anyone has any insight I'd greatly appreciate it!
Well after a lot of trial and error it seems to be working (so far). The problem was the syntax of line 4. This solved the issue and line 5 and 6 worked fine.
UPDATED LINE 4: tar -xjvf ~/phantomjs-1.9.8-linux-x86_64.tar.bz2 --strip-components=1 -C /opt/phantomjs/
Hopefully this helps someone else having the same issue.
Anyone know of a good tutorial on using it for highcharts in php?
I used this command to place the binay in /usr/local/bin
curl -Ls https://github.com/Medium/phantomjs/releases/download/v1.9.19/phantomjs-1.9.8-linux-x86_64.tar.bz2 | tar jxvf - --strip-components=2 -C /usr/local/bin/ ./phantomjs-1.9.8-linux-x86_64/bin/phantomjs

cPanel Fixwebalizer Issue

Whenever i am trying to run the script: /usr/local/cpanel/script/fixwebalizer , it is giving me the following error.
Enter Username to fix webalizer for? statxxxx
Log checker loaded ok..
==> cPanel Log Daemon version 25.0
Can't load '/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/DBD/mysql/mysql.so' for module DBD::mysql: libmysqlclient.so.16: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/XSLoader.pm line 70.
at /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/DBD/mysql.pm line 15
Compilation failed in require at /usr/local/cpanel/Cpanel/Logd.pm line 79.
BEGIN failed--compilation aborted at /usr/local/cpanel/Cpanel/Logd.pm line 79.
Compilation failed in require at /usr/local/cpanel/libexec/cpanellogd line 199.
If anyone know how to resolve it, your help is greatly appreciated.
Thanks in Advance.
You have a problem with perl on your server.
Try in order:
/scripts/checkperlmodules --full
If don't work:
Try reinstall Perl from layer1.cpanel.net (get perl588installer.tar.gz)
Force reinstall the perl modules. First login to perl shell
perl -MCPAN -e shell
Force install the below modules.
force install DBI
force install DBD::mysql

Progress dbtool errors

I am trying to run the Progress dbtool on our database but it is not working. I get to the proenv prompt as suggested by the documentation that I have. When I execute the dbtool against our database "access" (that's the name of our progress database)
Here are my steps:
[root#server ~]# cd /usr/dlc10.2B/bin
[root#server bin]# ./proenv
DLC: /usr/dlc10.2B
WRKDIR: /usr/wrk
OEM: /usr/oemgmt
OEMWRKDIR: /usr/wrk_oemgmt
Inserting /usr/dlc10.2B/bin to beginning of path and
setting the current directory to /usr/wrk.
OpenEdge Release 10.2B04 as of Thu Mar 3 19:14:26 EST 2011
proenv>dbtool access
/usr/dlc10.2B/bin/dbtool: line 2: DLC:: command not found
/usr/dlc10.2B/bin/dbtool: line 3: WRKDIR:: command not found
/usr/dlc10.2B/bin/dbtool: line 4: OEM:: command not found
/usr/dlc10.2B/bin/dbtool: line 5: OEMWRKDIR:: command not found
/usr/dlc10.2B/bin/dbtool: line 7: Inserting: command not found
/usr/dlc10.2B/bin/dbtool: line 8: setting: command not found
/usr/dlc10.2B/bin/dbtool: line 10: OpenEdge: command not found
/usr/dlc10.2B/bin/dbtool: line 12:
/usr/dlc10.2B/bin/dbtool: line 12: root#server:/usr/wrk
/usr/dlc10.2B/bin/dbtool: line 12: root#server:/usr/wrk: No such file or directory
What shell are you using?
Have you edited proenv?
proenv is a shell script. The errors that you report are simple shell variable assignments failing -- as if you are executing proenv with something other than "sh". The first few lines of proenv should be:
#!/bin/sh
# proenv
DLC="/usr/dlc"
WRKDIR="/usr/wrk"
OEM="/usr/oemgmt"
OEMWRKDIR="/usr/wrk_oemgmt"
PATH=$DLC/bin:$DLC/perl/bin:$PATH
PS1="proenv>"
export DLC WRKDIR PATH PS1 OEM OEMWRKDIR OEE OEEWRKDIR
#cd to the work directory
cd $WRKDIR
For that to fail you are either running a broken shell or someone has messed with the script.
By the way -- you should not need to be root to run dbtool. And you do not need to have your current directory in /usr/dlc10.2B/bin when you run proenv.
Actually dbtool should run just fine from a plain old command prompt so long as DLC is defined and $DLC/bin is in your PATH.