JetBrains Toolbox error: Failed to prepare Directory. Unable to create version folder - jetbrains-toolbox

Note:
I'm sure there is a better way of fixing this. I just thought I would put it out there to save someone some frustration.
I'm no expert, just trying to be helpful.
Problem:
When using JetBrains toolbox on an Ubuntu-based Linux distribution, the tool gives me an error:
Failed to prepare Directory. Unable to create version folder: /home/solomon/.local/share/JetBrains/Toolbox/apps/IDEA-U/ch-0/[a version number]
Details:
I've only come across it with Ubuntu-based Linux distributions.
Sometimes it doesn't happen when trying to install a new IDE after running the application as a super user.

I also just ran into this, and it turns out that the ~/.local/share/JetBrains/Toolbox was set to root ownership. I must have used sudo when running it originally.
The following fixed it:
sudo chown -R <username>:<username> ~/.local/share/JetBrains/Toolbox

Can fix by adding read and write priveleges to the directory where it's installed:
sudo chmod -R 777 /home/[username]/.local/share/JetBrains

After upgrading from Ubuntu 16.04 to 18.04, enountered the same issue. This worked for me,
sudo chown -R <username>:<username> ~/.local/share/JetBrains

For mac users:
sudo chown -R user:group /usr/local/jetbrains-cli/

On my Mac, it was the following:
sudo mkdir /usr/local/bin/apps
sudo chown -R $(whoami) /usr/local/bin/apps

Related

copy libpq.5.dylib to /usr/lib/libpq.5.dylib

I can't load packages in R because the file libpq.5.dylib is not in /usr/lib/libpq.5.dylib. It is in /usr/local/Cellar/libpq/13.0/lib/libpq.5.dylib
I tried this line: sudo ln -s /usr/local/Cellar/libpq/13.0/lib/libpq.5.dylib /usr/lib/libpq.5.dylib but I get this response: ln: /usr/lib/libpq.5.dylib: Operation not permitted
What can I do to get the file in /usr/lib/libpq.5.dylib without causing issues? This solution suggests that I may face problems down the line so I don't understand what to do.
You really don't want it in /usr/lib. Apple declared that as off-limits, and on newer macOS versions it lives on a read-only volume. Unless you're willing to go into recovery mode and manually tamper with the volume (and possibly repeat that on future OS updates), this is not the way to go.
Instead, let's address the core issue:
Dynamic libraries on macOS embed their own install path inside the binary, and the linker copies that into binaries linking against them. This information can be changed with install_name_tool (see man install_name_tool).
Examine the install name of the dylib:
otool -l /usr/local/Cellar/libpq/13.0/lib/libpq.5.dylib | fgrep -A2 LC_ID_DYLIB
If the printed path already points to the dylib itself (or a path that is symlinked to it), use this path as [new_path] below, and skip step 2.
If the dylib's install name does not point back to itself, run this:
sudo install_name_tool -id /usr/local/Cellar/libpq/13.0/lib/libpq.5.dylib /usr/local/Cellar/libpq/13.0/lib/libpq.5.dylib
And use /usr/local/Cellar/libpq/13.0/lib/libpq.5.dylib for [new_path] below.
For binaries that link against the dylib, run:
sudo install_name_tool -change /usr/lib/libpq.5.dylib [new_path] [path_to_binary]
I had the same issue building a container through docker for API use : RPostgres was installed but the library couldn't load, same error message.
Since I had installed Postgres on my machine, I figure the problem was worked around therefore I had no such message on local ; but here's how I solved this in my dockerfile, 100% verified on a machine with nothing related to R installed :
RUN apt-get update && apt-get install libpq5 -y
So executing apt-get update && apt-get install libpq5 -y on your terminal should do the trick. Light and efficient.
It tried to load libpq.5.dylib from the symlink /opt/homebrew/opt/postgresql/lib/libpq.5.dylib but could not find the file, so you need to update it:
# TODO: get this from the error, after "Library not loaded:"
SYMLINK_PATH="/opt/homebrew/opt/postgresql/lib/libpq.5.dylib"
# TODO: find this in your machine. The version maybe different than mine
DESTINATION_PATH="/opt/homebrew/opt/postgresql/lib/postgresql#14/libpq.5.dylib"
sudo mv $SYMLINK_PATH $SYMLINK_PATH.old
sudo ln -s $DESTINATION_PATH $SYMLINK_PATH

'RM' is not recognized as an internal or external command while using Meteor on Windows

i am currently having problem with 'meteor' and i am currently new to this learning this stuff. So, after installing 'Meteor' i opened command prompt on Windows and typed :
meteor create goodboy
and then,
cd goodboy
But to delete the live and already running example app, i used :
rm goodboy.*
But the command prompt, gave this error :
rm is not recognized as an internal or external command, operable
program or batch file.
Is there anyway i can fix this error, thank you.
Use del on Windows.
Also, this has nothing to do with Meteor. You can also delete a Meteor project by going to the folder and dragging it to the trash.
If you are on windows, git bash may run such commands.
If you are using Mac then we can simply use
rm -f src/*
and For windows we can use command for this is
del -f "src/*"
Hope this works fine for you.
Download and Extract PortableGit.
This has most of commonly used Linux based tools ported to windows.
Add [PortableGit Path]\usr\bin to PATH variable of Windows
You can also use your system's Git installation instead of PortableGit.
This should solve the problem
I'm running Git shell prompt and for some reason it doesn't have it any more. I ended up using Cygin to get it working:
https://www.cygwin.com/
My penny's worth.
You could potentially add rm to powershell. In your (or a) profile.ps1 (or other if your powershell is not core).
rm {
del
}
or as an alias
Set-Alias rm del
or (and this is a tricky one), run WSL, bind the target folder and run via the linux interface.
PS: running the command via the Git Bash (MINGW64) terminal as suggested above, did the trick for me.
I guess you are not using bash terminal. Try this..
1- Go to the folder that you want to remove its contents lets call it my-app folder.
2- Right click in the empty space, then choose get Bash here.
3- Paste the command rm -f A_folder/* (I'm about to remove the content inside A_folder folder which is a sub-folder inside my-app).
4- Hit enter.
That should remove all content from A_folder folder.
Hope that helps.
I guess you are not using the Git Bash terminal but the normal command prompt.
Do try the same on the Git Bash terminal and you would not face this error anymore.
first, install linux clients for windows, I use Ubunto LTS
then install node.js and run your command again.
here, you find good instructions to do it so, as well as how to install cool new Windows Terminal
you should add
"remove-build": "rmdir /s /q build",
"create-build": "mkdir build",
"clean": "npm run remove-build && npm run create-build",
in package.json

Installing Symfony on Mac OS X

I am having trouble installing this framework.
I entered this command on terminal as per the instructions on http://symfony.com/doc/current/quick_tour/the_big_picture.html. This was from the desktop.
$ php -r "readfile('http://symfony.com/installer');" > symfony.phar
The next part requires me to add this code:
$ sudo mv symfony.phar /usr/local/bin/symfony
Now I get this error:
mv: rename symfony.phar to /usr/local/bin/symfony: Not a directory
Please help me resolve this.
Try and move it to /usr/bin instead.
The directory you're trying to move it to doesn't exist. The instructions you're following may not be intended for OS X users.
The executable can go anywhere that's in your PATH.

PCL execution error

I'm fairly new to the PCL and linux in general. I'm having trouble following the examples in documentation. None of the examples execute.The code compiles fine and a executable is generated. But I keep getting a permission denied error. The usual chmod and chown dont work. I've tried reinstalling PCL. What am I missing here ?
Here is the output from terminal https://www.dropbox.com/s/pjv8utctnokpihd/error.txt
From the dump you provide it looks like you are working in a mounted disk (/media/chaitanya/); possibly it was mounted with noexec or something. Try running mount to see.
Alternatively try working in your home directory:
cd ~
cp -r /media/chaitanya/work/learn-pcl/ ./
etc.

Meteor.js installation failed

I wanted to install Meteor via
curl https://install.meteor.com | /bin/sh
like it's said in the documentation.
Every time I try this (also as sudo), I get this error:
**rmdir: /Users/christophz/.meteor-install-tmp: Directory not empty
Installation failed.**
The directory, of course, is empty before installation. After aborting the installation in my home folder there IS .meteor and still .meteor-install-tmp. But trying to create a new meteor app fails. My command line says it doesn't know this command.
I didn't find anything via Google. Can u help me and give me some hint?
Did you try rm -rf? With or without sudo:
rm -rf ~/.meteor-install-tmp
rm -rf ~/.meteor
Try deleting the directory. I think this happened to me once.

Resources