开发者

sudo: apt-get: command not found

开发者 https://www.devze.com 2023-02-15 06:49 出处:网络
I am really struggling to get my head around terminal i keep getting commands not found what am i 开发者_运维知识库doing wrong?

I am really struggling to get my head around terminal i keep getting commands not found what am i 开发者_运维知识库doing wrong?

I am trying to install ruby on the mac using this tutorial. http://www.ruby-lang.org/en/downloads/

but i keep getting the error sudo: apt-get: command not found

Ben-Easts-iMac:~ Ben$ sudo
usage: sudo [-n] -h | -K | -k | -L | -V | -v
usage: sudo -l[l] [-AnS] [-g groupname|#gid] [-U username] [-u username|#uid]
            [-g groupname|#gid] [command]
usage: sudo [-AbEHnPS] [-C fd] [-g groupname|#gid] [-p prompt] [-u
            username|#uid] [-g groupname|#gid] [VAR=value] [-i|-s] [<command>]
usage: sudo -e [-AnS] [-C fd] [-g groupname|#gid] [-p prompt] [-u
            username|#uid] file ...
Ben-Easts-iMac:~ Ben$ sudo apt-get install ruby1.9.1-full
Password:
sudo: apt-get: command not found
Ben-Easts-iMac:~ Ben$ sudo apt-get install ruby-full
sudo: apt-get: command not found
Ben-Easts-iMac:~ Ben$ sudo apt-get install ruby-full
sudo: apt-get: command not found
Ben-Easts-iMac:~ Ben$ sudo find / -name "apt-get" -print
find: /dev/fd/3: Not a directory
find: /dev/fd/4: Not a directory
sudo which apt-get

Can some please help me or give me an option to try to debug.

thanks


apt-get is suitable for Linux based Ubuntu machines; for MAC, try apt-get equivalent such as Brew


are you using a linux debian flavored system ?

if you are on Mac OS (iMac make me think so), you will not be able to use aptitude as it simply doesnt exist on Mac os.

may I advice you to go to http://www.macports.org/ which is kind of the same system (but based on Unix port)


I managed to final get a install up and running what a pain.

I am running an imac with mac os x version 10.6.6

i had to first run this command in the terminal. sudo port install ruby

ok great that then ran the install off ruby ok so after the install was complete i can the run this command.

rails new

which then created a project for me called "new" ok getting their.

next finding an editor to run rails- I installed netbeans seemed to be a good option.

next open new project and select ruby on rails application with existing sources, this then prompted me with the following error- that I don't have gems installed and to run this command.

gem install -v=2.3.5 rails

I have ran that command and got the following.

$ gem install -v=2.3.5 rails
WARNING:  Installing to ~/.gem since /Library/Ruby/Gems/1.8 and
      /usr/bin aren't both writable.
WARNING:  You don't have /Users/Ben/.gem/ruby/1.8/bin in your PATH,
      gem executables will not run.
Successfully installed rails-2.3.5
1 gem installed
Installing ri documentation for rails-2.3.5...
Installing RDoc documentation for rails-2.3.5...

ok so i then click ok on NetBeans and i am in with a project not sure whether gems is installed correctly tho, so gonna start learning ruby on rails now and ill report back with issues.

Hope this helps someone ;)


sudo yum install try using this

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号