Restore dump postgres heroku for cloud9


I need to restore a dump that was generated in heroku, but I have a sequence creation error, I already tried to update postgres that is in my application to 10.4 (same version of heroku) but it also does not work, I tried this command to do the restore
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U myuser -d mydb_development latest.dump

myuser and mydb I put my data, I removed it to have no problems.

I searched the internet and said that heroku_cli has to be updated, that postgres has to be updated, but the worst is that I can not make it work


I need update for postgres 10. This version is old. I use Heroku and a I want same version Heroku.
Do you have any tutorial for cloud9?
I need support


I updated postgres 9.3 for 9.6, thank for nothing cloud9

sudo add-apt-repository “deb trusty-pgdg main”
wget --quiet -O - |
sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-9.6