PhpStorm is not opening on my Ubuntu 14.04 - phpstorm

PhpStorm was running fine till this morning but suddenly it has stopped working. Since the IDE was not loading at all I decided to reinstall it.
The first step was I used the following command to remove the application
$ sudo rm -R ~/Phpstorm*
Then I downloaded version 2016.1 from https://confluence.jetbrains.com/display/PhpStorm/Previous+PhpStorm+Releases and followed the instruction as shown in this article:
https://www.jetbrains.com/help/phpstorm/install-and-set-up-product.html
But neither any launcher icon was created nor I am able to find PhpStorm in application search.
Running $ ./phpstorm.sh in terminal window gives me
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=350m;
support was removed in 8.0
The above message is familiar to me because it used to come every time I run PhpStorm from terminal.
But after reinstall, the message is appearing but the application does not start.
Edit
Content of /usr/share/applications/phpstorm.desktop
[Desktop Entry]
Version=5.0.4
Name=JetBrains PhpStorm
# Only KDE 4 seems to use GenericName, so we reuse the KDE strings.
# From Ubuntu's language-pack-kde-XX-base packages, version 9.04-20090413.
GenericName=Text Editor
Exec=phpstorm
Terminal=false
Icon=/opt/PhpStorm-145.1616.3/bin/webide.png
Type=Application
Categories=TextEditor;IDE;Development
X-Ayatana-Desktop-Shortcuts=NewWindow
[NewWindow Shortcut Group]
Name=New Window
Exec=phpstorm
TargetEnvironment=Unity
Reference article:
https://blog.shaharia.com/create-phpstorm-luncher-and-terminal-command-on-ubuntu

Related

CodeSniffer not working on PhpStorm/MacOS but it work in Docker

I use PhpStorm 2021.3 on MacOS (Apple Sillicon M1). I'm not sure the problem is with PhpStorm but PHP Code Sniffer doesn't work.
When I type this command it doesn't show any errors in the code and I'm sure I got some.
vendor/bin/phpcs
The only thing that appears in the console is Time: 38ms; Memory: 8MB
CodeSniffer is installed by composer.
On the other hand, if I enter this same command in Docker (with Laravel Sail, in bash), I do get a list of errors/warnings in my code.
Going back to PhpStorm, I tried to configure the IDE to work with PHPCS in Docker, but it still doesn't work, and I don't know where to look.
PHP_CodeSniffer version 3.6.2 (stable) by Squiz
How to make CodeSniffer work, either through PhpStorm or automate it in PhpStorm and Docker?

Brownie Installed but not recognized

I've installed eth brownie with the command pip install eth-brownie but when ever I type brownie, it says
The term 'brownie' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1
I had this problem also, when running "pip install eth-brownie" in the command line, I was given a warning that said
C:\Users\my_username\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\Scripts
is not on the PATH.
You could try running pip uninstall eth-brownie and re-installing pip install eth-brownie to see which file you need to add to PATH.
Copy the file path it gives (should look similar to what I posted above)
To add this to path (on windows 10) type advanced system settings into the search bar, click view advanced systems settings, a window that says "system properties" should pop up, click environment variables..., in the next window that pops up (titled environment variables) click on path then click edit, a new window will pop up titled edit environment variable click new then paste the file path into a new line. Click ok and close all of your programs (if you don't close/restart your programs they will not be aware of the change).
When you open your IDE (visual studio code in my case) you should be able to run brownie by typing brownie
This at least causes a temp recognition of "Brownie":
$env:Path += ";C:\Users\<< username >>\.local\pipx\venvs\eth-brownie\Scripts"
This path will display too if you try to reinstall Brownie. Then add it to PATH variables.
I got zsh not recognize brownie command error, so i add the brownie executable into my PATH in .zshrc worked:
export PATH="/Users/{your_user_name}/.local/pipx/venvs/eth-brownie/bin:$PATH"
Not sure if this works for you.
The following steps worked for me on Mac OS.
step1: uninstall eth-brownie "pip uninstall eth-brownie"
step2: re-install "pip install eth-brownie"
step3: Quit VS Code and Open the project again.
using 'pip install eth-brownie' instead of 'pipx install eth-brownie' solved the problem for me.
I faced the same problem 6 months ago. The issue was with the Python paths in System Environment Variables. I had installed a 3.10 version of python however, pip and pipx was still installing packages in the path of 3.09. You can verify if you are facing the same problem:
Hit Windows button and search for "Advanced System Settings"
Hit Environment Variables to see the Path field
If you see multiple paths of python versions, then that is a possible problem
What you need to do then is
uninstall eth-brownie "pip uninstall eth-brownie"
come back to the Path field in Advanced System Settings
Remove any redundant paths by hitting the edit button
Run pipx install eth-brownie (using pipx is recommended over pip)
step2: re-install "pip install eth-brownie"

Unable to install MySQL on Windows 10 - Installer hangs indefinitely

I am trying to install MySQL on a Windows 10 PC. I downloaded the installer package and followed those steps
Went to https://dev.mysql.com/downloads/windows/
clicked on "MySQL Installer"
Scrolled to Generally Available(GA) Releases section
Clicked on "Windows (x86, 32-bit), MSI Installer" (mysql-installer-community-5.7.21.0.msi) and it started the download.
Once the download was complete, I double clicked on the installer and it gave a usual pop-up for any installation like,"Do you want this app to make changes to your device?" after clicking on "yes" for the answer to this question, it shows "Please wait while Windows configures MySQL-Installer-community" like below screenshot.
And then it keeps showing this installation progress bar for a very long time. Like more than 7-8 hours and the installation never completes
So it seems something is wrong as I don't think MySQL installation needs this long time. I tried to restart my computer and then delete any files related to MySQL from my computer and then started the whole process of installation again. But no luck yet
Anyone has any suggestion on this or did anyone face this kind of issue before? If so, is there a fix or a work around for this?
ok. So finally this is how I resolved my issue. And I found the solution at https://bugs.mysql.com/bug.php?id=82004 . The solution to this problem is to close an open "Windows installer" (the one using 0 memory and CPU) via task manager and the installation should begin running as expected.
Alternative solution: Use an administrator command prompt to run the MySQL installer on Windows 10. Details:
(Note: if you have any problems in the following steps, you can try to restart your computer. Then restart the steps.)
Right-click the Start/Windows icon in the bottom-left corner of Windows.
Click: Windows PowerShell (Admin).
A window asks: Do you want to allow this app to make changes to your device? Click: Yes.
Change to the directory with the MySQL installer. For example, if you downloaded the MySQL installer, type something like:
cd C:\Users\my_username\Downloads\
(Note: To save some typing, you can type a few characters, and then press the tab key, to make Windows show you various auto-completion options.)
Run the MySQL installer. Type something like the following command---make sure to include the period and backslash at the beginning---and press Enter.
.\mysql-installer-community-8.0.11.0.msi
Note: The idea of using an administrator command prompt came from John Geffe, in the link below, which was cited in the answer written by the original poster (user8425592):
https://bugs.mysql.com/bug.php?id=82004
Bug #82004 MySQL Installer freezes during "Please wait while Windows configures..." phase
[6 Feb 3:58] John Geffe
To get past this problem I had to run the .msi installer from an the
Administrator command prompt. Hopefully this helps someone in the
future.
[19 Apr 18:14] Jim McCauley
John Geffe: Thanks! Your note on installing as an administrator seems
to have taken care of the problem.
this did the trick for me: https://ao.ms/mysql-community-server-msi-installer-hangs-on-windows-10/
run cmd (commandline) as Administrator
cd to your location that you downloaded the .MSI to
run the “msiexec” commandline tool with option “/i” as follows:
msiexec /i [replace with file name]
example: msiexec /i mysql-installer-community-5.7.20.0.msi
Another thing that worked for me was running the installer in compatibility mode for previous version of Windows. You can try that as well.
Go to the link you provided (the first one) and try installing MySql Workbench. That is the version that is commonly used, and one that I verified works in Windows 10. Here is the link: https://dev.mysql.com/downloads/workbench/
Obviously, make sure you choose the right architecture, have the correct permissions to install software, and have enough space on your hard drive, or on the machine you are installing to.
Please install "Update for Visual C++ 2013 and Visual C++ Redistributable Package" from Microsoft Site "http://download.microsoft.com/download/0/5/6/056DCDA9-D667-4E27-8001-8A0C6971D6B1/vcredist_x64.exe"
Please look here at https://support.microsoft.com/en-in/help/3179560/update-for-visual-c-2013-and-visual-c-redistributable-package
Yes, I also got the same problem on my Windows 10.
Followed the Powershell solution and it worked.
Just repeat the above:
Click Start on bottom left corner
Scroll down the application list until Windows Powershell
Select Windows Powershell again on sub-menu
Type in cd (to change to your .msi folder)
Type .\xxxxx.msi (this is the installer file name)
All good.
Once you install the above package run the installer again and do the steps. You will be able to install the mysql-installer-community-5.7.21.0 for 64 bit windows 10
closing Windows Installer instances using 0 memory and CPU helps me to get past this problem.
For me on Window-10 machine, there was a problem with the "mysql-connector-net-8.0.11.msi". I was not able to uninstall this and hence all my subsequent efforts to install MySQL were failing. I did the following to overcome this issue.
Re-installed "mysql-connector-net-8.0.11.msi" Get it here and used the 'Repair' option
Installed the "mysql-installer-web-community-8.0.11.0.msi"
These two things solved my problem. Hope this helps.
The reson is your antivirus didn't allow the mysql, so Disable protection(until restart),( in your task bar right side click the arrow and right click to antivirus,to select (Disable protection(until restart)).then restart your computer again install mysql installer it will work.
For this issue just run .msi file in command administration like
E:\mysql-installer-community-8.0.20.0.msi\
follow this link:
https://kb.foxitsoftware.com/hc/en-us/articles/360040660611-How-to-install-MSI-from-command-line-with-administrator
In my case, an upgrade to 5.7.29 on Windows 10 via mysql-installer-web-community-8.0.20.0.msi, the install froze "backing up the database". The log tab showed no activity for 8 minutes. I clicked on cancel, then at the "are you sure" prompt I declined to cancel, and all of a sudden the install was working again. Very strange...
I encountered the same problem, preparing but can never get started. Tried to close other installation programs with no use, but I took the inspiration and proceeded with restart the computer and it worked nicely. So, I think the issue is to get rid of everything that could be in the background running that somehow interferes the installation.
You should run the installer as an administrator but this specific installation may not provide an option for this. Some might have it but it's most likely that it's unavailable for many users. So you should run it in cmd or powershell. And don't forget to run these shells as an administrator coz that's the whole point here. Once there, navigate to the installer's location which usually is in the downloads directory and run it using this command ./name.msi
Make sure no other ongoing installation of this instance. Close it if there exists one and undo the changes made by uninstalling it from the panel. If still facing difficulties, try restarting your machine and repeat this procedure...
Have fun
I had the same Problem, A simple solution is to give access the "SYSTEM" to the msiserver...I know, this is hard to understand what I am saying....You can Simply see this Video and you will definitely find the answer https://www.youtube.com/watch?v=6SdXMjXmnUk, It is a matter of just 3 minutes...
I encountered the same issue of taking too much time to install mysql community installer.I tried 3 times by cancelling the installation and restarting to perform a new installation.But had same issue. I tried 2 things
First to end all tasks associated with installation which I performed for installing mysql using Task Manager
Reinitiated the installation but didn't solved my issue.
Secondly tried to install through Windows Powershell as admin, which solved the problem.
Click on the Windows icon/start on the bottom left corner.
Right click and select the option Windows Powershell (Admin).
A pop up window will ask Do you want to allow this app to make changes to your device?....Click Yes.
Now cd to your downloads folder/wherever you downloaded the .msi file (For example cd C:\Users\MYPC\Downloads).
Once you reach to the folder where the .msi file is kept, run the following command.
.\mysql-installer-web-community-8.0.23.0.msi (Note: this is the version which I have downloaded, modify as your version).

how to downgrade Chrome on Ubuntu and disable auto-update?

I want to downgrade my chrome on Ubuntu
Because I have problems when selenium runs against Chrome 34.
I have installed chrome 33.
But then every once in a while the auto-updater update the chrome.
How can i disable the auto-upadter on Linux specifically?
I had a similar task recently. This is the script I ran to download previous Chrome version, disable auto update and check the installed version:
sudo wget http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_75.0.3770.142-1_amd64.deb && \
sudo dpkg -i google-chrome-stable_75.0.3770.142-1_amd64.deb && \
sudo apt-mark hold google-chrome-stable && \
google-chrome-stable --version \
you can google to find an archive website. I have mentioned 2 of them here, though there are hundreds of them around.
0- choose the version you want to install by going to an archive website like this:
http://www.ubuntuupdates.org/pm/google-chrome-stable
1- In the Download section download the 64-Bits or 32-Bits package suitable for your OS ( or you can directly Press APT_INSTALL button)
3- Install the package using Ubuntu software center. you may need to remove the existing version first.
4- for disabling auto updates you can go to SystemSettings/ Software & Updates from Ubuntu applications Menu
Doing the same things command line:
I assume your user name is "user" you replace it with your username.
1- Browse the website http://www.slimjet.com/chrome/google-chrome-old-version.php or any other archive website.
2- Download a proper version of google-chrome ( I brought 49.0.2623.75 Linux_64)
3- Save the downloaded file in /home/user/Downloads
4- Open a console and execute the following commands:
user#host:~/workspace $ cd ~/Downloads/
user#host:~/Downloads $
user#host:~/Downloads $ sudo dpkg -i ./chrome64_49.0.2623.75.deb
of course you would replace the file name with the one you downloaded.
You can search for software and updates in your dash bar
You can click on Softwares and updates app which is listed
Go to the other Software tab in the window which is opened
you can uncheck the http://dl.google.com/linux/chrome/deb/stable main
and then you can uninstall the new version of chrome and install the old one.
Hope this helps.

MacPorts is unusable

I've recently installed MacPorts as explained on MacPorts website. All the process went well. The .profile file in my home directory has been updated (in this file the paths "/opt/local/bin" and "/opt/local/sbin" are added to the environment variable PATH) and all the macports files are in the directory "/opt". When I type "which port" in the shell, it returns "/opt/local/bin/port".
But something weird happens when I ask to install the port "octave-devel" (I've installed MacPorts to use Octave on my Mac in the first place). So when I enter the command "sudo port install octave-devel +atlas+docs" (as explained in GNU Octave wiki) in the terminal and type my password, the shell replies "Error: Port octave-devel not found". However the port "octave-devel" seems to exist because I've found its description on this page of the macports website.
Because I had to use Octave quickly I first wanted to uninstall MacPorts and install Fink instead and I tried the method described on the MacPorts website but after I typed "sudo port -fp uninstall installed" it returned "Error: No ports matched the given expression". I couldn't even uninstall this software! I really think that it is a problem of MacPorts itself and not the octave port but I can't find what exactly.
Eventually I used Octave on a Windows computer but it annoys me not to know what is wrong with MacPorts on my computer. And mainly, I want to be capable to use GNU Octave on my Mac because I need it for school.
Thank you in advance and happy holidays.
I'm not sure which version of OSX you are running, however, I have octave (not octave-devel) version 3.6.4 installed via macports on a machine running OSX 10.9.1. This was built using:
sudo port install octave
which yields a known bug building the atlas dependency that results from a missing fortran compiler. At this point you have two options. Before attempting to install octave first try to install atlas separately, either overriding the standard clang compiler with the gcc4x flag, or install atlas using:
sudo port install atlas +nofortran
which runs fine using clang. With atlas installed, octave should build to completion although there is a possibility that you will find an error regarding the use of arpack by apple as a vector library. Using +arpack is preferred, so it may be useful to load this by hand as well before starting your octave install.
Trying to install Octave using MacPorts I ran into a similar problem.
Summary
My solution was to first clean & build atlas separately using gcc47 instead of the default mpclang34. Then to build the default octave.
Details
This is on a MacBook running an older OS (10.7.5), the standard Octave (3.8.2) package failed to build - it hung on building the atlas dependency.
Solution:
sudo port clean atlas
sudo port -v install atlas +gcc48
sudo port -v install octave +atlas+docs
I'm currently going through the process of installing Octave via MacPorts. I used the following command which I found on Shifteleven.com:
sudo port install octave-devel +gcc45
It seems to be working so far. You also need to make sure you've installed the Xcode command line tools, which is something that I forgot to do the first time I tried.
I also ran into problems installing Octave using Macports on OSX 10.10.1 and solved them, similar to #Tom_N_PDX and #isak.
Short version
I got it working using one of the options described by #isak.
More detailed version
Running sudo port install octave failed because of the missing Fortran compiler problem.
I next installed Fortran using Macports sudo port install gcc48 and then tried re-installing Octave
sudo port clean octave
sudo port install octave
This "hung" on Atlas, as others have mentioned, although I now realize it just takes a long time and I killed it before it finished. Likely it would have worked, as the output said it had found Fortran
Selected C compiler: /usr/bin/clang
Selected F77 compiler: gfortran48
I then installed atlas separately, using the +gcc48 flag, as suggested by #isak
sudo port install atlas +gcc48
but it displayed the same compiler information as above (consistent with my conjecture that the above would have worked). This process took about 4 hours. You can monitor the progress of the task in the logfile (found with the command sudo port logfile atlas), which reassures you it's doing something and not "hung". (Oddly the output does halt mid-message, but it always eventually resumed. Also there were a lot of warning messages.)
Last, running the following worked:
sudo port clean octave
sudo port install +arpack
I actually first tried without the +arpack option and it worked but I got the following message, consistent with #isak's answer
WARNING: Dependency 'arpack' is installed with the +accelerate variant, using Apple's Vector Libraries which have some known bugs that can cause Octave to crash if using certain functions in arpack. The +atlas variant does not have these issues with Octave, but does take many hours to compile even on modern hardware.
When I reinstalled Octave with the +arpack flag it took less than a minute (because I had already installed Atlas).
I had a similar problem with MacPorts. I would recommend using HomeBrew instead. Here are the commands to install Octave on HomeBrew:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew upgrade
brew install octave