xgettext: No such file or directory - gettext

I'm using this command line:
xgettext -kT._ -kT._n:1,2 -kT._p:1c,2 -kT._pn:1c,2,3
-LC# --omit-header --from-code=UTF-8 -o messages.pot
-c -n -p PO ./TransClassOne.cs
Nevertheless, I'm getting this message from xgettext:
xgettext.exe: error while opening "._" for reading: No such file or directory
Any ideas?

Using MacOS:
Install gettext tool
If already installed, you might want to reinstall - brew reinstall gettext
If using some bash profile (oh-my-zsh e.g.), export gettext and update it:
nano ~/.zshrc
at the end of file add export PATH="/usr/local/opt/gettext/bin:$PATH" and save it
update profile with . ~/.zshrc ; pay attention to not forget the dot before zshrc
restart your terminal (optional)
Run your command again.

Related

Postgresql Error in psql command not found in zsh mac

I have installed postgresql on my mac!
However when I run the command "psql" it says:
zsh: command not found: psql
I have located the location of my psql command (with other all postgres commands + pgadmin) and it is in /Users/Library/PostgreSQL/13/bin
when I do echo $PATH I get:
/Library/Frameworks/Python.framework/Versions/3.8/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
Now what do I do to run psql without any error?
/Users/Library/PostgreSQL/13/bin is not in your "path"
Easy solution would be to create a symbolic link for psql in /usr/local/bin/:
ln -s /Users/Library/PostgreSQL/13/bin/psql /usr/local/bin/psql
Otherwise you can edit your profile file and extend your path to /Users/Library/PostgreSQL/13/bin
I also had the same issue and a simple solution is to restart the terminal.
It gives an opportunity for terminal to reload Postgres.
What i did to make it work:
I didn't have a .zshrc file and created one (peeped here link)
Steps for creation:
Open Terminal
Type touch ~/.zshrc to create the respective file. (touch command will create the .zshrc in your current directory but it will be hidden)
Hit Return
To view/open ~/.zshrc you can do either of two things:
Open Finder > Press Cmd+Shift+. (and you will see hidden files) my path to the file: Macintosh HD > Users > anatolii => .zshrc
Or:
Open Terminal > and type: open ~/.zshrc
Editing .zshrc
Open .zshrc in editor and pasted this line:
export PATH=/Library/PostgreSQL/15/bin:$PATH

cannot execute binary file centos?

I am using centos 6.9 and want to install xampp. But when I run the command on the terminal it showing error i.e. cannot execute binary file. So, How can I fix this problem and successfully install xampp ? Please help me.
chmod +x xampp-linux-x64-7.0.22-0-installer.run
./xampp-linux-x64-7.0.22-0-installer.run
after this command it showing
bash: ./xampp-linux-x64-7.0.22-0-installer.run: cannot execute binary file
You're probably running the install (binary) with a lesser privileged user. You'll have to use root user for modifying SELinux settings as such:
semanage fcontext -a -t httpd_sys_script_exec_t '/<install-location>(/.*)/?'
restorecon -R -v /<install-location>/

How to install Robomongo from tar.gz file as a program in Ubuntu 15.10

Nowadays robomongo developers releasing the new versions of robomongo as tar.gz not in .deb packages that was easy for double click installations. But that option is no longer available. So how to install it as a program in Ubuntu. I have tried extracting the package and install but failed.
admin#admin-lenovo:~$ cd Downloads/
admin#admin-lenovo:~/Downloads$ tar -xzf robomongo-0.9.0-rc4-linux-x86_64-8c830b6.tar.gz
admin#admin-lenovo:~/Downloads$ cd robomongo-0.9.0-rc4-linux-x86_64-8c830b6/
admin#admin-lenovo:~/Downloads/robomongo-0.9.0-rc4-linux-x86_64-8c830b6$ ./configure
bash: ./configure: No such file or directory
Also .make and ./install failed as no files found. How to install it as a program?
Robomongo is now Robo 3T. Following are the updated steps:
Download the tar file from robomongo site. The current file is robo3t-1.1.1-linux-x86_64-c93c6b0.tar.gz, but yours could be different.
Open up the terminal, switch to download directory and run the following commands:
$ tar -xvzf robo3t-1.1.1-linux-x86_64-c93c6b0.tar.gz
$ sudo mkdir /usr/local/bin/robomongo
$ sudo mv robo3t-1.1.1-linux-x86_64-c93c6b0/* /usr/local/bin/robomongo
$ cd /usr/local/bin/robomongo/bin
$ sudo chmod +x robo3t
$ sudo gedit ~/.bashrc
Add the following line to the end of .bashrc file:
alias robomongo='/usr/local/bin/robomongo/bin/robo3t'
Save and close the file. Now reload it using the following command:
$ source ~/.bashrc
Then you can run robomongo from your terminal and it will work:
$ robomongo
You can also put the robomongo into /usr/bin like I do:
tar xf robomongo-0.9.0-rc8-linux-x86_64-c113244.tar.gz
sudo mv robomongo-0.9.0-rc8-linux-x86_64-c113244/ /usr/bin/robomongo
export PATH=/usr/bin/robomongo/bin:$PATH
If you are using fish shell, you need to change the last line to:
set PATH $PATH /usr/bin/robomongo/bin
Now you can start it with command:
robomongo
Pulled this from my dotfiles. It's ugly but it works... and it's a bit more verbose so it should be understandable to most:
# Pull down and install Robomongo by copying files
cd /tmp
wget https://download.robomongo.org/0.9.0/linux/robomongo-0.9.0-linux-x86_64-0786489.tar.gz
tar xf robomongo-0.9.0-linux-x86_64-0786489.tar.gz
sudo mv ./robomongo-0.9.0-linux-x86_64-0786489 /opt/robomongo
cd /usr/sbin
sudo ln -s /opt/robomongo/bin/robomongo
# Grab image to use for icon
cd /opt/robomongo
wget http://mongodb-tools.com/img/robomongo.png
# Create desktop entry
touch /tmp/robomongo.txt
echo "[Desktop Entry]" >> /tmp/robomongo.txt
echo "Encoding=UTF-8" >> /tmp/robomongo.txt
echo "Name=Robomongo" >> /tmp/robomongo.txt
echo "Comment=Launch Robomongo" >> /tmp/robomongo.txt
echo "Icon=/opt/robomongo/robomongo.png" >> /tmp/robomongo.txt
echo "Exec=/usr/sbin/robomono" >> /tmp/robomongo.txt
echo "Terminal=false" >> /tmp/robomongo.txt
echo "Type=Application" >> /tmp/robomongo.txt
echo "Categories=Developer;" >> /tmp/robomongo.txt
echo "StartupNotify=true" >> /tmp/robomongo.txt
mv /tmp/robomongo.txt ~/.local/share/applications/robomongo.desktop
1. First Download the version from the official Robomongo website bellow:
Download Robomongo From Official website using this link
2.Then extract the downloaded tar.gz file in your downloads folder.
3. Copy and paste the extracted folder into your opt folder
/opt
NB: If you don't have permission to paste in this folder use the bellow command in terminal to access the folder.
$ sudo chmod -R 777 /opt
4. Open the opt/robomongo/bin folder and launch Robomongo by clicking the executable icon.
opt/robomongo/bin
5. Simply Create a database and right click on the Robomongo icon and select the lock to launcher option. This will create a shortcut t launch the Robomongo application at any time you need.
You can first extract the package:
cd ~/Downloads
tar -xzf robo3t-x.x.x-linux-x86_64-xxxxxxx.tar.gz
You can rename the folder to something simpler
mv robo3t-x.x.x-linux-x86_64-xxxxxxx robo3t
Dowload any images with format .png [click here][1]
(For whatever reason, the Robo3T package itself does not contain any png file for the icon)
Save the image like robo3t.png and move this image to folder robo3t and then, instead of dumping the whole thing in /usr you can transfer this directory to /opt directory and symlink the binary file to /usr/bin or /usr/local/bin. This makes for a better way of organising your applications, and keeping such add-on packages is what /opt is for.
So first move the directory
sudo mv robo3t /opt
and then symlink it like so
sudo ln -s /opt/robo3t/bin/robo3t /usr/bin/robo3t
then you can create an Unity desktop file for your launcher
nano ~/.local/share/applications/robo3t.desktop
and finally; paste the next code in the file newly created
[Desktop Entry]
Encoding=UTF-8
Name=Robo 3T
Exec=robo3t
Icon=/opt/robo3t/robo3t.png
Terminal=false
Type=Application
Categories=Development;
And Happy coding!
Currently there is no installer for robomongo-0.9.0-rc4. you can create a desktop shortcut to robomongo-0.9.0-rc4-linux-x86_64-8c830b6/bin/robomongo file and use it just like any other Ubuntu app. Take a look at this tutorial https://askubuntu.com/a/142197/71544
Wathc this Video
How to install robomongo on ubuntu 16.4
OR
Follow Below Steps
Open Terminal and run the below command
wget https://download.robomongo.org/0.9.0/linux/robomongo-0.9.0-linux-x86_64-0786489.tar.gz
Extract the tar.gz file to enter below command
tar -xvzf robomongo-0.9.0-linux-x86_64-0786489.tar.gz
create a dir /usr/local/bin dir name directory name robomongo and move it to extract file into robomongo directory
sudo mkdir /usr/local/bin/robomongo
sudo mv robomongo-0.9.0-linux-x86_64-0786489/* /usr/local/bin/robomongo
run command only if robomongo isn't executable file
cd /usr/local/bin/robomongo/bin
sudo chmod +x robomongo
./robomongo
Don't worry about how to install Robo-3T on your Linux machine, follow these simple steps:
Download script from Robo3T-Installation-With-Desktop Entry
Open terminal in directory where above file is downloaded and run below command
sudo chmod +x ./Robo3T-Installation-Menu.sh
Then type below command and hit enter
./Robo3T-Installation-Menu.sh
Just wait to complete it, once completed enjoy RoboMongo. Search in menu with name "Robo 3T".
Well, I do not know if it might still help, but one efficient way to install Robomongo from tar.gz file is the following:
Go to https://robomongo.org/download to grab the tar.gz file,
After download,
cd Downloads/*
and then type in the terminal:
$ sudo tar xzf robo3t-1.3.1-linux-x86_64-7419c406.tar.gz -C /opt/
Make sure your file has been unzipped in the /opt directory by checking:
$ ls -lh /opt/
Next, install it by doing:
$ sudo /opt/robo3t-1.3.1-linux-x86_64-7419c406/bin/robo3t
The installation wizard pops up and accept the terms and continue installation. Then Enjoy
NB: You will not see the robot3t icon in the start menu. So to start robot3t, always
/opt/robo3t-1.3.1-linux-x86_64-7419c406/bin/robo3t to launch robo3T.
Hope it helps ;)

PostgreSQL command psql not found, trouble adding to $PATH

I am trying to add PostgreSQL to my $PATH variable. I tried this to see where psql is
whereis psql
To which I got a null response. I do have the PostgreSQL.app installed so I clicked on "Open psql" from the GUI and it prompted the Terminal to open and display:
/Applications/Postgres.app/Contents/MacOS/bin/psql; exit;
So I tried to add the above to the $PATH variable in my ~/.bash_profile (which may have its own problems since I don't know if you can add paths with .app extensions to the $PATH) but when I restart my Terminal and do echo $PATH | grep Postgres.app I get nothin'.
Here's an approach to take help isolate problems you may have.
Step 1: See if you can add PostgreSQL to your PATH without using Bash dot files.
$ export PATH=/Applications/Postgres.app/Contents/MacOS/bin:$PATH;
$ which psql
If this works...
Step 2: Verify that ~\.bash_profile is being sourced when a new user session is started.
Add the following to the end of your ~/.bash_profile:
echo "From bash_profile.";
Now restart Terminal.app or iTerm and see if that message appears about your prompt.
If this works...
Step 3: Add PATH to ~/.bash_profile.
In ~/.bash_profile:
export PATH=/Applications/Postgres.app/Contents/MacOS/bin:$PATH;
Restart your terminal and run:
$ which psql
If you're not seeing:
/Applications/Postgres.app/Contents/MacOS/bin/psql
Then it might be time to scrap trying to install PostgreSQL as a Mac package and use Homebrew.
NOTE: It's psql and NOT pgsql.
From the Postgres documentation page:
sudo mkdir -p /etc/paths.d && echo /Applications/Postgres.app/Contents/Versions/latest/bin | sudo tee /etc/paths.d/postgresapp
restart your terminal and you will have it in your path.

Cant access Coda application from command-line

I am having trouble accessing Coda from command-line. I installed the "command-line coda" plug-in, verified that my installation is in the correct location, yet I still can seem to access Coda. Coda sits in my "Applications" folder which is the default location for the plug-in.
Anyone have have this problem? Any tips? On the their site it is recommended that you change the path.
export CODEPATH=/Applications/Coda.app
So I included the above line in my .bash_profile which did not help.
$ Coda -v
-bash: Coda: command not found
Thanks for any direction you can provide.
The default way to open an application on a Mac is to use open -a AppName so you should be able to change your bash profile to use that:
$ open -a Coda
I've created a bash script (as opposed to using the plugin) that Gregory Tomlinson originally posted about (it looks like he's since taken it down but it looks like the following).
Create a new file in /bin called coda:
$ cd /bin
$ sudo touch coda
$ vim coda
Hit an i to enter insert mode. Then include the following code:
#! /bin/bash
if [ "$1" = "" ]; then
echo "Please specify a file to open or create"
exit 0
else
for ARG in $*
do
touch -a $ARG && open -a Coda $ARG
done
exit 0
fi
Save and quit (hit the esc to exit insert mode then type :w !sudo tee % >/dev/null followed by the return key, press L for load when prompted, then type :q to quit). Then give that file execute permissions:
$ chmod u+x coda
Start a new Terminal window and you should be able to use:
$ coda filename.foo
Or just:
$ coda
For some strange reason, my paid registered Coda 2 app just wouldn't open for me this morning. I found this terminal command that worked for me:
open -a Coda\ 2
You can also put the following in your ~/.bash_profile file:
alias coda='open -a "Coda 2"'
I had a similar problem. After installing the plug-in, I still couldn't launch coda from the command line. I took a closer look at /user/local/bin and somehow the permissions had gotten reset so I didn't have execute permissions for /user/local/bin.
I updated my permissions with:
sudo chmod o=rx,g=rx /usr/local/bin
This solved my problem. However, Coda won't launch if the specified file does not exist, which makes it hard to create a file from the command line.