Linux 下的node環境的搭建

目標:在裏linux下學習nodejs、JavaScript、vue.js、Less等等(Less在windows下會出許多問題)  

      搭建js運行環境,安裝編輯器,搜狗輸入法安裝等。

1.安裝Linux安裝Linux就很少說了,今天俺裝的是Linux Mint畢竟不想浪費太多的時間去搞這些配置之類的東西,急着學習js呢.

你能夠參考這裏安裝http://jingyan.baidu.com/article/4d58d5411380dd9dd5e9c07e.html講的足夠詳細html

2.首先安裝搜狗輸入法吧!要不心情都沒了

默認安裝成功後系統是不帶中文輸入法的,這可急壞啦,搜個東西都沒辦法打字,在百度上輸入sougou仍是能夠出現搜狗輸入法的for Linux,先下載下來再說,vue

下載後是sogoupinyin_2.1.0.0086_amd64.deb這樣的文件夾,試運行一下sudo dpkg -i sogoupinyin_2.1.0.0086_amd64.deb 慢慢等待
Selecting previously unselected package sogoupinyin.
(Reading database ... 195644 files and directories currently installed.)
Preparing to unpack sogoupinyin_2.1.0.0086_amd64.deb ...
Unpacking sogoupinyin (2.1.0.0086) ...
dpkg: dependency problems prevent configuration of sogoupinyin:
sogoupinyin depends on fcitx-frontend-gtk2; however:
Package fcitx-frontend-gtk2 is not installed.
sogoupinyin depends on fcitx-frontend-gtk3; however:
Package fcitx-frontend-gtk3 is not installed.
sogoupinyin depends on fcitx-frontend-qt4; however:
Package fcitx-frontend-qt4 is not installed.
sogoupinyin depends on fcitx-module-kimpanel; however:
Package fcitx-module-kimpanel is not installed.
sogoupinyin depends on libopencc2 | libopencc1; however:
Package libopencc2 is not installed.
Package libopencc1 is not installed.
sogoupinyin depends on fcitx-libs (>= 4.2.7); however:
Package fcitx-libs is not installed.
sogoupinyin depends on fcitx-libs-qt (>= 4.2.7); however:
Package fcitx-libs-qt is not installed.node

dpkg: error processing package sogoupinyin (--install):
dependency problems - leaving unconfigured
Processing triggers for libglib2.0-0:amd64 (2.48.2-0ubuntu1) ...
No such key 'Gtk/IMModule' in schema 'org.gnome.settings-daemon.plugins.xsettings' as specified in override file '/usr/share/glib-2.0/schemas/50_sogoupinyin.gschema.override'; ignoring override for this key.
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for desktop-file-utils (0.22+linuxmint1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for shared-mime-info (1.5-2ubuntu0.1) ...
Errors were encountered while processing:
sogoupinyinlinux

一連串的錯誤看得一臉矇蔽,大概意思就是安裝失敗,須要好多依賴項,看了看其餘的資料大概須要依賴12項,別慌一條命令搞他(Package fcitx-frontend-gtk2 is not installed.)npm

sudo apt-get install fcitx libssh2-1 默默等待 嘿嘿 完啦 還出現同樣的錯誤 再來一條命令ubuntu

sudo apt-get -f install 好啦 選擇y 以後等安裝完重啓就能夠啦windows

3.搭建開發環境

下載vscode,nodejsapp

配置node開發環境:進入根目錄建立app文件夾在app文件夾下建立software文件夾frontend

解壓node  $tar -xvf node-v6.11.2-linux-x64.tar.xz  更名 $mv node-v6.11.2-linux-x64 nodejsssh

在app的software下執行

owen@owen-Inspiron-5537 /app/software $ sudo mv /home/owen/Downloads/nodejs .

owen@owen-Inspiron-5537 /app/software $ sudo ln -s /app/software/nodejs/bin/node /usr/local/bin/node
owen@owen-Inspiron-5537 /app/software $ sudo ln -s /app/software/nodejs/bin/npm /usr/local/bin/npm

檢測node -v

v6.11.2

成功

相關文章
相關標籤/搜索