Heroku CLI unresponsive on Ubuntu 16.04 - heroku

I'm trying to get heroku cli installed on Ubuntu 16.04, following the documentation here: Heroku CLI Documentation and while my system appears to install it correctly, whenever I try any Heroku commands like heroku login the terminal hangs, and becomes unresponsive. I'm not getting any error codes.
Here's what I've tried:
I've tried installing heroku via the following methods:
wget -qO- https://cli-assets.heroku.com/install-ubuntu.sh | sh
That didn't work, I uninstalled and tried this:
sudo snap install heroku --classic
That did't work, I uninstalled and tried this:
wget https://cli-assets.heroku.com/heroku-cli/channels/stable/heroku-cli-linux-x64.tar.gz -O heroku.tar.gz
tar -xvzf heroku.tar.gz
mkdir -p /usr/local/lib /usr/local/bin
mv heroku-cli-v6.16.12-04b3626-linux-x64 /usr/local/lib/heroku
ln -s /usr/local/lib/heroku/bin/heroku /usr/local/bin/heroku
And got the same result.
The one command that does seem to work is heroku --version, but only after about 3 minutes does it return heroku-cli/6.16.12-04b3626 (linux-x64) node-v9.11.1
. I don't know if there is something going on with my os, but everything else on my system seems to be working fine.
Any help would be greatly appreciated.

The problem was my ~/.netrc file. I had somehow gotten the same entry into it over 12,000 times. After clearing that file heroku works.

Related

Cant Install Laravel with Docker on Windows WSL

I can't seem to install the new laravel with Docker Desktop on Windows 10.
What I did so far:
I installed Docker Setup with WSL2.
then I installed Ubuntu Distro from Ms Store.
then on command prompt terminal I run wsl command then when I tried to run curl -s "https://laravel.build/example-app" | bash I got this error -sh: curl: not found.
I can't event use the apt command, it gives the same error.
The only working command is ls
WSL integration options on Docker Desktop are already checked
Am I missing something here? How to fix this?
It looks like the curl command is not installed in your Ubuntu WSL distribution. You can install it by running the following command in your WSL terminal:
sudo apt-get update
sudo apt-get install curl
This should install curl and allow you to run the curl command to download the Laravel installer script.
If you're still having trouble using apt, it's possible that your Ubuntu WSL distribution is not properly installed or configured. You may want to try reinstalling or resetting it.
Once you have curl installed, try running the Laravel installer script again with the curl command:
curl -s "https://laravel.build/example-app" | bash
This should create a new Laravel application in a directory called example-app.
If you're still having trouble, you can try using the Docker image for Laravel instead of installing it directly on your machine. The official Laravel Docker image includes everything you need to get started with Laravel in a containerized environment.

_heroku:2: HEROKU_AC_ANALYTICS_DIR: parameter not set

I installed heroku cli via snap (sudo snap install heroku --classic), but the autocomplete does not work throws an error: _heroku:2: HEROKU_AC_ANALYTICS_DIR: parameter not set, never encountered this before, who knows what could be the problem?
i`m using the zsh command shell
Try this solution:
https://devcenter.heroku.com/articles/heroku-cli-autocomplete
heroku update
heroku autocomplete
Worked for me.
UPD:
Run the following after commands above (heroku asks to do this after running them anyways):
printf "$(heroku autocomplete:script zsh)" >> ~/.zshrc; source ~/.zshrc

Windows bash 'Cannot create property 'exitCode' on string 'autoupdate:' Installing Heroku CLI/Toolbelt

I am attempting to install the Heroku CLI/Toolbelt on an bash shell version 4.3.48(1) (x86_64-pc-linux-gnu) running on Windows 10. I'm entering wget -qO- https://cli-assets.heroku.com/install-ubuntu.sh | sh in the command line, and after the packages download I'm getting the below:
Preparing to unpack .../heroku_6.14.24-1_amd64.deb ...
Unpacking heroku (6.14.24-1) ...
Setting up heroku (6.14.24-1) ...
+ which heroku
+ LOCATION=/usr/bin/heroku
+ echo heroku cli installed to /usr/bin/heroku
heroku cli installed to /usr/bin/heroku
+ heroku version
▸ Cannot create property 'exitCode' on string 'autoupdate:'
And then it just takes me back to the command line. If I try heroku --v or any other heroku CLI command I get this same error
▸ Cannot create property 'exitCode' on string 'autoupdate:'
I can't find any record of this error code anywhere online. Any thoughts? I really do not know where to start here, usually a good search at least sets me on the path but I have crickets here. Let me know if any further details are required. FWIW the toolbelt was working as of a few days ago, I just had to uninstall and reinstall my bash shell due to an unfortunate incident with Linuxbrew so am rebuilding everything from scratch.
this is fixed but the CLI might have trouble updating. Delete ~/.local/share/heroku and run heroku update and it should be fixed.

Can't install heroku-accounts plugin in heroku cli

I'm trying to install heroku-accounts using this command:
$ heroku plugins:install heroku-accounts
but instead I got this:
heroku-cli: Updating plugins... !
/Users/hit/Library/Caches/heroku/update.lock is locked with a reader active: 17964
I try rm the update.lock but it still get same result
I solve the problem by updating Heroku (I use homebrew install heroku)
heroku update
brew upgrade heroku
None of the above answers seem to work for me. The issue happened when I updated my heroku-cli via brew to version heroku-cli/6.13.8 (darwin-x64) node-v8.2.1 .
Although Error was very explicit that one more process is running, ps | grep showed no such process.
The only solution was to Restart System Once.
There is another copy of the heroku CLI running with the PID 17964
You can find it by doing something like this:
ps | grep 17964
Once you stop that process try your install again.

Why can't I get the postgresql server to run?

Ok. I have been trying to solve this problem for several days. I installed, uninstalled, and reinstalled Postgresql 3 times. I followed precisely the instructions in this forum: https://dba.stackexchange.com/questions/42048/cant-connect-to-the-postgres-server-ls-tmp-s-pgsql-5432-no-such-file-or-dir
I found this solution in many forums, so I tried to run:
$ mkdir /var/pgsql_socket/
$ sudo mkdir /var/pgsql_socket/
$ ln -s /private/tmp/.s.PGSQL.5432 /var/pgsql_socket/
But this didn't work. When I try to start the server it still says there is another one running and then proceeds to fail every time I try to create a database or type "psql"
I then tried to run the following in order to change the path of the commands from OS X's builtin version of postgres to my version and it seemed to work:
$ cd /usr/local/bin
$ rm postgres
$ ln -s /Library/PostgreSQL/9.2/bin/postgres postgres
$ rm psql
$ ln -s /Library/PostgreSQL/9.2/bin/psql psql
$ rm pg_ctl
$ ln -s /Library/PostgreSQL/9.2/bin/pg_ctl pg_ctl
So then I ran the following to create a user for postgres:
$ sudo -u postgres createuser --superuser $Sarah
$ sudo -u postgres createuser --superuser user_sarah
$ sudo -u postgres psql postgres
But it kept saying "unknown user postgres"
I then tried to install the Ruby pg gem, but that also failed, saying there was a problem with necessary libraries.
I have saved a text file of everything I tried to do in the terminal. Let me know if I should post that. Thanks.
update:
When I try to run this:
$ pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start
I get this:
-bash: /usr/local/bin/pg_ctl: No such file or directory
Which is different from a lot of other errors that I have seen posted on this problem.
first, you should verify that there is no postmaster running: ps -ef | grep postmaster. once you've verified the postmaster is not running, you should look into the postgresql command initd. Depending on your server installation, it may or may not be installed. You need to create a database before attempting to start postgres. It sounds to me like you got an installation that didn't install the main postgresql commands to /usr/bin, pg_ctl being one of these.
FYI: the postgres account is not a login account and is automatically created when installing postgresql, so it should be there if you had a good installation. You cannot sudo as postgres if postgres is not in the sudoers file.
The homebrew install of PostgreSQL does not create or need a postgres account, so all the mentions of doing sudo -u postgresor ps -fu postgres don't apply to your case.
The command brew info postgresql outputs various information about to start and stop it, you may read them. By contrast you don't want to put blind faith into what random users tell about how they "fixed" their non-working installation. In fact, the web carries a shocking amount of bad advice concerning PostgreSQL on MacOS X, and to me the answer you linked on dba.se is among them. It's wrong from start to finish, and you should note that it was not accepted as an answer. Certainly the author means well, but he fails to see that his own context can't be generalized to other installations.
The worst part is the suggestion to delete in /usr/local/bin/ the binaries postgres, psql, pg_ctl and soft-linking them into supposed equivalents inside /Library/PostgreSQL/9.2/bin/.
To me it just breaks the homebrew install.
No wonder that after doing this you get this error:
/usr/local/bin/pg_ctl: No such file or directory
So my answer would be to reinstall postgresql with brew to restart from a clean state, then make sure that all postgres commands you launch are from /usr/local/bin, and always first read the server log file passed to pg_ctl if you have any doubt on anything PG-related.

Resources